First question here.
I have some issues with the XCode Build System, especially with definitions of the processor.
#define CONFIGand then include the header on the next line. When the header is included, the macro is already defined and the header is configured accordingly.
But that’s where it’s starting to get weird!
The macro is not recognized at all, and the header is included as if
#define statement was not there, so it fails
#define CONFIG 1 and it is defined as 0 in
#define CONFIG 1 #include
// From there: // - Build System: CONFIG is always 0, except if defined in build settings // - Clang (only): CONFIG is 1
#ifndef HEADER_H #define HEADER_H #if !defined(CONFIG) #define CONFIG 0 #endif #endif
The build system works as expected when the pre-processor macro is defined in the project build settings under “Apple Clang – Pre-processing”. It defines the global macro using
-D parameter for
clang make it available to all files used by the project.
However, the source code is compiled correctly when I use clang from a terminal using
Can anyone tell me what I need to configure for the building system to behave normally?