NO

Author Topic: Compiling options  (Read 2835 times)

vedro-compota

  • Guest
Compiling options
« on: October 24, 2011, 04:40:07 PM »
Guys please tell me - how can I configure the Pells C in such way that code in different code files will be compiled as if it is one code file? (to set function prototypes only once)
thanks in advance)

CommonTater

  • Guest
Re: Compiling options
« Reply #1 on: October 25, 2011, 03:39:30 AM »
Break your code up into logical groupings of functions...  Main, Settings, Dialogs, Files, etc.... in separate .c source files.  Add each of the source files to your project.  Next prepare header (.h) files for each with your function prototypes, extern variables etc in them and #include them where needed at the top of your code pages...  As needed means that if (for example) there's nothing in the Settings group needed by Files, you don't include the header there.  Then compile...

For a better look at project structure, download some of the stuff from the user contributions forum and look how others do it.

This is standard C stuff, nothing magical in Pelles...

vedro-compota

  • Guest
Re: Compiling options
« Reply #2 on: October 25, 2011, 05:32:01 AM »
thank you, CommonTater)