So, I have been using CodeBlocks IDE for compiling my C and C++ programs. But I want to run the program from the command line. How do I go about this?
P.S I want to run it on Windows platform.
If you want to build a Code::Blocks workspace from the command line, use
codeblocks.exe --build --target=W32_Release --no-batch-window-close MyApp.workspace where
MyApp.workspace is your workspace. If you want to build a program from the command line without using Code::Blocks, use
gcc -O2 program.c -o program where
program.c is your program, or
g++ -O2 program.cpp -o program for C++. You can get gcc & g++ from here.