4

So I have heard some people talk about it and I guess I can't google the right words but what do I do when building c across platforms that may have the header files in different locations without needing to actually change the c code?

Comments
  • 1
    Instead of
    #include "header.h"
    use
    #include <header.h>

    and change the include-paths in the projects settings (cmake/make) according to the current platform.
    As long as the header-files are named the same, all you have to do is change the path to them.

    In gcc the corresponding flag is -I.
  • 0
    @Fakerlol Thanks, I think that's what I was looking for.
Add Comment