I am new to Code::Blocks. For my studies I am programming several small programms in C (just to try things out).
I tried to put them all in one project, because they belong to the same topic, but that doesn’t work because each of them has a main function.
Any ideas how I can put those files together somehow, but not depending on each other?
let’s say that your project contains 3 c files and each c file is a separate program and it contains its own
mainfunction:So you can write a Makefile (its name in your computer should be “Makfile”). It will build the program you want separately
This is how your makefile looks:
with the above Makefile you can build each program separetly
example
will build only program1
or you can buil all programs with