Do you have some concrete examples of when including source files is used?

An example in one of the projects I'm currently doing has platform specific files included like:

#if defined(LIN)
#include "plat_lin.cpp"
#elif defined(WIN)
#include "plat_win.cpp"
#elif defined(MAC)
#include "plat_mac.cpp"
#endif

then the code that uses those in the including file. Other selective includes are the network code (using either Boost++ or cURL) and other libraries where there is more than one solution that can be wrapped to a consistent interface.

Its much neater than lots of ifdefs throughout the code.


Reply to this email directly, view it on GitHub, or unsubscribe.
You are receiving this because you are subscribed to this thread.Message ID: <geany/geany/pull/3490/c1540077601@github.com>