Warning: file_get_contents(/data/phpspider/zhask/data//catemap/6/cplusplus/145.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
C++;iPhone编译(STL问题?) 我试图编译一些C++代码作为静态库,用于iPhone上。如果我为模拟器(i386体系结构)编译东西,所有东西都会编译得很好,但是当我将体系结构切换到arm时,我会发现所有这些包含错误,似乎都在iPhone SDK STL头中。知道发生了什么吗_C++_Iphone_Xcode_Stl_Compilation - Fatal编程技术网

C++;iPhone编译(STL问题?) 我试图编译一些C++代码作为静态库,用于iPhone上。如果我为模拟器(i386体系结构)编译东西,所有东西都会编译得很好,但是当我将体系结构切换到arm时,我会发现所有这些包含错误,似乎都在iPhone SDK STL头中。知道发生了什么吗

C++;iPhone编译(STL问题?) 我试图编译一些C++代码作为静态库,用于iPhone上。如果我为模拟器(i386体系结构)编译东西,所有东西都会编译得很好,但是当我将体系结构切换到arm时,我会发现所有这些包含错误,似乎都在iPhone SDK STL头中。知道发生了什么吗,c++,iphone,xcode,stl,compilation,C++,Iphone,Xcode,Stl,Compilation,第一个错误: /Developer/Platforms/iPhoneOS.platform/Developer/SDKs/iPhoneOS3.0.sdk/usr/include/c++/4.2.1/string:45:0 Bits/c++config.h: No such file or directory in /Developer/Platforms/iPhoneOS.platform/Developer/SDKs/iPhoneOS3.0.sdk/usr/include/c++/4.2.1

第一个错误:

/Developer/Platforms/iPhoneOS.platform/Developer/SDKs/iPhoneOS3.0.sdk/usr/include/c++/4.2.1/string:45:0 Bits/c++config.h: No such file or directory in 
/Developer/Platforms/iPhoneOS.platform/Developer/SDKs/iPhoneOS3.0.sdk/usr/include/c++/4.2.1/string

添加
/Developer/Platforms/iPhoneOS.platform/Developer/SDKs/iPhoneOS3.0.sdk/usr/include/c++/4.2.1/armv6-apple-darwin9/
作为包含路径


另外,请向Apple提交一个bug。

要修复所有SDK版本的此bug,请添加

$(SDKROOT)/usr/include/c++/4.2.1/armv6-apple-darwin9

“Header Search Paths”构建设置(架构不重要;这对我来说仍然适用于模拟器)。

没有armv6-apple-darwin9子目录

这是使用iPhone 3.2 SDK Beta btw。如果我选择目标设备作为设备3.2,它似乎可以工作,但所有较低版本的操作系统都会出现这些错误。添加此路径只能修复设备版本。