Glitchy font when running start command from ConEmu - c++

Before I start...
my tool chain consist of MinGW, ConEmu, and Vim to make C++ programs.
I wanted to test to see if MinGW was working by seeing if g++ was setup correctly on my system PATH, and it turned it was because I successfully compiled a simple console program that outputted the text I provided to standard out. However, I came across this...
When I do the command start test.exe from window's cmd shell in ConEmu (I use the start command because I want it in its own standalone prompt), the text looks like this.
These little white lines are annoying and I would like to know what's causing it...
When I run the standalone from the explorer it looks completely normal.
Is there something in ConEmu's settings that's causing this that anybody is aware of ?

I found a work around. I just end up using the program called cmder. Which is practically ConEmu but with more features built on top of it.

Related

Windows cannot find MinGW

I am trying to install MinGW and add it to my PATH on my Windows 10 computer (I need to be able to compile C++ in Atom, in case this is relevant to the answer). As far as I can tell, it is successfully installed and added to my PATH. I know it is added because when I change it to make it wrong, I get an error in Atom. Also, every tutorial I can find on adding it to my PATH says the things that I did. In cmd, when I type gcc, nothing happens. No output, no error message. Only a space, like hitting return twice in a text editor. However, in Atom, when I try to compile and run, nothing happens. No output or error message. compile/run result The picture is of what happens when I try to compile and run.
Can someone tell what I am doing wrong? Thanks!
Note: I am not a beginner, so my lack of output is not user error. Also, I can run the same program without a problem on a Mac.
It sounds like your system is resolving gcc to a different executable than expected.
From a cmd prompt, try where gcc and if the path doesn't look right, then that is a good place to start. If it does look right, then I suggest using a tool like sysinternals procmon.exe. Set the filter to just gcc.exe and then run the gcc command from the cmd prompt and see what the procmon output is.

Qt Application not running

I am trying to run a simple "Hello, world" console application but I am experiencing some errors when compiling that I am not familiar with. I have done a bit of research into similar problems with Qt but I haven't been able to find a solution. The closest solution I have come across was to change my Patch Command setting under:
Preferences -> Environment -> System -> Patch Command
to
usr/bin/xterm -e
However, when I try to do this it goes red indicating that I do not have this file.
Environment Preferences Window
The following image is a screenshot of what is displayed in the terminal window when attempting to compile my project.
Console Application Output
Any help on this problem would be much apprectiated! It is very frustrating having something like this hold me back!
Don't run your project in a terminal unless you actually select a working terminal, and that's all. The patch command is irrelevant in this anyway - it's not the terminal, but the patch command -- used to patch source code. You don't need it unless you explicitly use code patching. Go to Projects (Ctrl-5), click on the active Run configuration for your project, uncheck "Run in terminal", done.

C++/WINAPI find out whether program is outputting to cmd or bash

I am currently writing a toy-compiler in my free-time in C++ and I am using Visual Studio do to my development work. Although I am on a Windows System, I have replaced my standard Console with the msysgit bash version. Now, I am trying to implement color-coded error messages which work fine in bash, but don't work in cmd. I am coloring my text using the bash color keys like \x1B[0m etc... Now, the problem is that when the compiler outputs error messages to the console, someone using cmd.exe as their default console will see a garbled mess of seemingly random letters making the error message hard to decipher. One solution I found to be working is completely disabeling color coding on Windows systems which works, but is kind of inconvinient. I am looking for a way to find out whether the console to which the compiler is outputting to is cmd.exe or bash.exe. I have looked through MSDN and didn't find anything particulary useful.

Build systems in Sublime Text

I'm just beginning to learn programming (on C++ and Python), and by beginning I mean total beginning ("hello world" beginning...). Not wanting to use multiple IDE's, I would like to be able to code and build–simple–programs with my text editor, Sublime Text 2. Could someone indicate me, with a step-by-step tutorial, how to implement C++ and Python compiling and executing capabilities in Sublime Text.
I've searched Sublime Text build systems on the site, but the answers are very specific and can't help a rookie like me (but they'll probably help me later).
Thanks
Sublime Text 2 already comes with scripts for building and running Python and C++ programs.
Simply press Cmd+B (or Ctrl+B on Windows & Linux) when a .py or .cpp file is open. The Python file will automatically execute and show the result in the built in console.
For C++, you need to press Cmd+Shift+B (Ctrl+Shift+B on Windows & Linux) to run it after building.
You need to have Python installed (get it here for Windows), and also a C++ compiler. The build system for C++ tries to call g++ by default (get it here for Windows. Remember to select the C++ compiler when installing!).
You will need to add the directories to path (c:\python32\ or similar for python, c:\mingw\bin or similar for the C++ compiler).
On windows, you may experience problems running the C++ programs (it tries to use bash). But Ctrl+B builds the program, and you can then use a command line to run it. Python works flawlessly on Windows.
windows(install minigw, python2.7 and added to the system path)
cpp:
build: ctrl+b
run: ctrl+shift+b
python:
build and run: ctrl+b
you may try to learn the the .sublime-build files in your Tools -> Build system -> New build system
So, you don't want to use an IDE but then you want IDE features from a text editor? :)
Most people who use a text editor for writing code use terminal to build and run the code.
So, for C++, the instructions are:
make (or gcc myprogram.c)
./myprogram
for a Python program, it's even simpler:
python ./myprogram.py
If you're not comfortable with terminal, then you probably need an IDE.
for c++ I actually made sublime to produce colorful error messages which are easier to read and you can also click on the errors which takes you to the file with the error.
You can look at how I modified the build to do what I wanted in here

Can't run programs on my mac

I've been programming on windows for about three months now and when my computer finally died I bought a mac. I'm really happy with it except I can't figure out how to run my c++ programs.
On windows it would open up in command prompt so I figured it would do the same thing except with terminal.
After I write my programs (in Xcode) I can compile them and it'll tell me if there are syntax errors but the run and run related buttons are all Grey and unusable.
It's incredibly annoying that I can't see how the program that I put 4 hours into runs and even more annoying that I don't know if I've made a runtime error. Someone please help.
Thank you very much, James
Assuming that you're trying to write a program that you interact with on the command line, you want to create a "Command Line Tool" project, found under "Application" in the Mac OS X section of the New Project dialog. Choose "C++ stdc++" from the "Type" dropdown, as well. This will give you a main.cpp that should look familiar to you, with a "Hello, World!" sample.
Note that when you Run this program, it might appear to do nothing - You need to open the Console (from the Run menu, or shift+command+R) to see your output.
Xcode deals in projects. If you're just opening the source file, there is no project. Create a project with the files in it and Xcode should let you run it.
Alternately, you can just use G++ on the command line to compile your files and run the resulting executable there.
Try compiling from the terminal as stated above. The a.out file should be created, and should run as long as Xcode has been installed. It should work fine from the terminal, and point out any errors in the compiler's output.
To runs the a.out file, ensure you are in the files directory in terminal and type ./a.out