Your Makefile might build several executables (with a plain make command, and you could configure your IDE or editor to run it). You could also learn more about build automation. Perhaps CodeBlock could be configured to run it somehow (that is a very different question). You can run that gcc command in a terminal. Details could be operating system specific. The -o fooprog requires to output the executable fooprog. The -Wall -Wextra asks for all warnings and more of them. some -I or -D for preprocessing, some -L or -l for linking libraries). To compile foo.c into some program fooprog you want to run something like gcc -Wall -Wextra -g foo.c -o fooprogĪnd you may want other arguments to gcc (e.g. (BTW, remove gcc on your system, and CodeBlocks become useless to build any program -both inside a project or single file- from C code) It is the compiler which compiles your code (not CodeBlock). ![]() ![]() It runs compilation commands, probably using GCC (but consider also Clang). How to compile and run a C file in CodeBlocks which is outside a project? ![]() Code::Blocks is not a compiler, but an IDE.
0 Comments
Leave a Reply. |
AuthorWrite something about yourself. No need to be fancy, just an overview. ArchivesCategories |