stdlib.h在XCode 4.3中的位置是什么?

时间:2012-02-22 17:57:34

标签: xcode xcode4 xcode4.3

请告诉我,在XCode 4.3中stdlib.h的位置是什么?

3 个答案:

答案 0 :(得分:7)

4.3之前的Xcode版本/Developer中的内容现在位于Xcode.app捆绑中。有几个,每个支持的SDK和平台一个:

$ find /Applications/Xcode.app -name stdlib.h
/Applications/Xcode.app/Contents/Developer/Platforms/iPhoneOS.platform/Developer/SDKs/iPhoneOS5.0.sdk/usr/include/c++/4.2.1/tr1/stdlib.h
/Applications/Xcode.app/Contents/Developer/Platforms/iPhoneOS.platform/Developer/SDKs/iPhoneOS5.0.sdk/usr/include/stdlib.h
/Applications/Xcode.app/Contents/Developer/Platforms/iPhoneSimulator.platform/Developer/SDKs/iPhoneSimulator5.0.sdk/usr/include/c++/4.2.1/tr1/stdlib.h
/Applications/Xcode.app/Contents/Developer/Platforms/iPhoneSimulator.platform/Developer/SDKs/iPhoneSimulator5.0.sdk/usr/include/stdlib.h
/Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX10.6.sdk/usr/include/c++/4.2.1/tr1/stdlib.h
/Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX10.6.sdk/usr/include/stdlib.h
/Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX10.7.sdk/usr/include/c++/4.2.1/tr1/stdlib.h
/Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX10.7.sdk/usr/include/stdlib.h

答案 1 :(得分:5)

如果您安装命令行工具(Xcode>偏好设置>下载),则该文件会出现在/usr/include/stdlib.h

答案 2 :(得分:1)

我认为你应该使用unistd.h代替stdlib.h。我在导入stdlib.h时尝试使用sleep()时遇到问题,我必须导入unistd.h

相关问题