News:

When registered with our forums, feel free to send a "here I am" post here to differ human beings from SPAM bots.

Main Menu

how to compile many files.c

Started by bsartini76, December 27, 2011, 04:21:54 PM

Previous topic - Next topic

bsartini76

 Hi,

I am learning how to use Code::Blocks and I've read tutorials, but I didn't found how to compile many source codes. It shows how to compile just one "main.c". I have an algorithm which has 4 files.c and they are called by the "main", which has another name, not main.

Do I have to put this name "main.c" in order to compile or can I work with its original name? Or do I have to change the calls that other files do, when they process and return the values to the main file?

All the files.c have to be in Source in the project?

Thank you in advance.

MortenMacFly

Quote from: bsartini76 on December 27, 2011, 04:21:54 PM
All the files.c have to be in Source in the project?
Yes, single file compilation supports to compile only a ... erm ... single file. ;-)

For everything else you need a project.
Compiler logging: Settings->Compiler & Debugger->tab "Other"->Compiler logging="Full command line"
C::B Manual: [url="https://www.codeblocks.org/docs/main_codeblocks_en.html"]https://www.codeblocks.org/docs/main_codeblocks_en.html[/url]
C::B FAQ: [url="https://wiki.codeblocks.org/index.php?title=FAQ"]https://wiki.codeblocks.org/index.php?title=FAQ[/url]