Am currently trying to link a bunch of Objective C modules into a static library.
I am getting the following error and am unable to locate any information on how the __STATIC__ can not be disabled when building a PCH file.
error: __STATIC__ predefined macro (as opposed to __DYNAMIC__) was disabled in PCH file but is currently enabled
The command to build the PCH file is:
clang -cc1 -target-cpu x86-64 -g -fno-validate-pch -emit-pch -x objective-c-header afile.pch -o afile.pch.bin -O0 -fmath-errno -fobjc-arc -fobjc-runtime=gnustep -fblocks -pthread -fexceptions -fobjc-exceptions -I...
With lots of -I options to locate header files.
The library file is being built with:
clang -static -o lib.a -include-pch afile.pch.bin ...
with pretty much the same link options and include directories.
Any help would be much appreciated on how to deal with this issue.