Warning: file_get_contents(/data/phpspider/zhask/data//catemap/4/macos/9.json): failed to open stream: No such file or directory in /data/phpspider/zhask/libs/function.php on line 167

Warning: Invalid argument supplied for foreach() in /data/phpspider/zhask/libs/tag.function.php on line 1116

Notice: Undefined index: in /data/phpspider/zhask/libs/function.php on line 180

Warning: array_chunk() expects parameter 1 to be array, null given in /data/phpspider/zhask/libs/function.php on line 181

Warning: file_get_contents(/data/phpspider/zhask/data//catemap/3/templates/2.json): failed to open stream: No such file or directory in /data/phpspider/zhask/libs/function.php on line 167

Warning: Invalid argument supplied for foreach() in /data/phpspider/zhask/libs/tag.function.php on line 1116

Notice: Undefined index: in /data/phpspider/zhask/libs/function.php on line 180

Warning: array_chunk() expects parameter 1 to be array, null given in /data/phpspider/zhask/libs/function.php on line 181
Xcode如何使用字符串参数传递预处理宏_Xcode_Macos - Fatal编程技术网

Xcode如何使用字符串参数传递预处理宏

Xcode如何使用字符串参数传递预处理宏,xcode,macos,Xcode,Macos,我正在使用shell脚本来构建项目。 我想传递带有空格的字符串,例如Dell Networking作为GCC_预处理器_定义的参数 我试着跟着他们,但没有一个奏效 xcodebuild -verbose -sdk macosx10.7 -project TestProject/TestProject.xcodeproj -configuration Release GCC_PREPROCESSOR_DEFINITIONS="${PreprocessorArg=$TestArgument}" x

我正在使用shell脚本来构建项目。 我想传递带有空格的字符串,例如Dell Networking作为GCC_预处理器_定义的参数

我试着跟着他们,但没有一个奏效

xcodebuild -verbose -sdk macosx10.7 -project TestProject/TestProject.xcodeproj -configuration Release GCC_PREPROCESSOR_DEFINITIONS="${PreprocessorArg=$TestArgument}"

xcodebuild -verbose -sdk macosx10.7 -project TestProject/TestProject.xcodeproj -configuration Release GCC_PREPROCESSOR_DEFINITIONS=${PreprocessorArg=$TestArgument}
我只得到了绳子的第一部分。戴尔甚至没有双引号。

试试这个:

TestArgument='Dell Networking'
xcodebuild -verbose -sdk macosx10.7 -project TestProject/TestProject.xcodeproj -configuration Release GCC_PREPROCESSOR_DEFINITIONS=${PreprocessorArg="$TestArgument"}