I hope the answer to this question isn’t too simple or obvious. I’ve been trying to get used to using a text editor and MinGW to compile some C code but I’ve found that I can’t quite tear myself away from Visual C++ (mostly because of the IDE). The thing is, I’ve never used Visual C++ to just compile C/C++ into an executable; I always used the debugger and ran the program from inside Visual C++.
I just want to compile my program into a simple executable. How do I need to set up Visual C++ 2010 Express to do that? Don’t I just set it to release mode and compile? Is there anything else I need to do (any settings I need to change)? Thanks.
If you’ve run the program in the debugger, then you’ve already compiled it!
Just find the executable in the correct folder. If it’s a debug build, it’ll be under Debug/, similarly for Release/
Note that you can’t distribute a debug binary because it depends on the debug CRT which will only be available on a machine with VS installed.