请告诉我,XCode 4.3 中 stdlib.h 的位置是什么?
问问题
8581 次
3 回答
7
4.3 之前的/Developer
Xcode 版本中的内容现在包含在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
于 2012-02-22T20:51:04.897 回答
5
如果您安装命令行工具(Xcode > Preferences > Downloads),则该文件位于/usr/include/stdlib.h
.
于 2012-02-22T20:47:38.670 回答
1
我认为你应该使用unistd.h
而不是stdlib.h
. 我在导入时尝试使用 sleep() 时遇到问题stdlib.h
,我必须导入unistd.h
.
于 2012-02-22T18:11:31.697 回答