Author Topic: how to compile many files.c  (Read 2656 times)

bsartini76

  • Guest
how to compile many files.c
« on: December 27, 2011, 04:21:54 pm »
 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.

Offline MortenMacFly

  • Administrator
  • Lives here!
  • *****
  • Posts: 9702
Re: how to compile many files.c
« Reply #1 on: December 28, 2011, 05:06:20 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: https://www.codeblocks.org/docs/main_codeblocks_en.html
C::B FAQ: https://wiki.codeblocks.org/index.php?title=FAQ