how do you turn your program into a .exe for cmd?

Hey guys,

I don't remember if I said this before but the compiler I use is Microsofft's Visual C++ 2010 and I was wondering if you guys could tell me how to turn my program into an executable file so I can run it directly through command prompt and not have to open there compiler to run it?
Thanks.
If you want to run your program through the command prompt, simply type the filename of your exe into cmd.exe.

"C:/Users/You/Documents/Programs/Something/something.exe"


If you want to know how to build your program using the command prompt, that depends on the command line syntax of your compiler.
1. Open visual studio and build your Source files (project) by presing F7
2. Go to or CD to C:\Users\ *Your user name* \Documents\Visual Studio ?? \Projects\*Solution DIR*\ * Debug* \
3. run the exe

Additionaly you may want to switch to "Release" before you bild you app, in that case the exe will be located in ...\Projects\ * Release *\ directory.

the difference is obvious since released exe is much smaller cos it does not use debug simols and similar stuff.
Last edited on
Thanks guys.
Topic archived. No new replies allowed.