I am trying to run xcodebuild with various preprocessing macros.
I tried:
xcodebuild -scheme myscheme \ -configuration "Archive" \ -sdk "iphoneos5.1" archive \ CONFIGURATION_BUILD_DIR=../build \ GCC_PREPROCESSOR_DEFINITIONS=ADHOC
but I got a compilation error because the preprocessor was not used:
I could not see it with the -D flag of the compilation command
But it is displayed at the beginning of the script
Build settings from command line: CONFIGURATION_BUILD_DIR = ../build GCC_PREPROCESSOR_DEFINITIONS = ADHOC SDKROOT = iphoneos5.1
Code at the beginning of the compilation error:
#ifdef ADHOC NSUInteger toto = 0; #endif
but i get use of undeclared identifier error for toto
ps: if I define preprocessor macros in Xcode, then these values ββare used, mine are redefined and archiving is done. But I want to make several assemblies based on different preprocessor definitions (which sounds better than creating new assembly configurations or circuits for me)
Dirty Henry
source share