简体   繁体   中英

Command line arguments with CodeBlocks

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? PS 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 .

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM