请告诉我,XCode 4.3中stdlib.h的位置是什么?XCode 4.3中stdlib.h的位置是什么?
回答
在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
非常感谢!你告诉我不仅在哪里可以找到它,而且还可以找到找到其他头文件的好方法! – 2012-02-23 18:07:33
我想你应该使用unistd.h
而不是stdlib.h
。我在导入stdlib.h
时尝试使用sleep(),但必须导入unistd.h
。
好的。你能告诉我unistd.h的位置吗? – 2012-02-22 19:06:05
它位于/usr/include/unistd.h – larick 2012-02-22 21:15:49
[stdlib](http://pubs.opengroup.org/onlinepubs/009695399/basedefs/stdlib.h.html)由POSIX指定。你不应该解决它。 bames53(下面)有正确的答案(一般的解决方案,即使是非Xcode命令行版本)。 trojanfoe(上面)回答了一个没有被问到的问题(与Xcode构建有关)。另外,有时你没有那种纬度(stdlib.h - > unistd.h) – jww 2012-12-29 08:17:19
如果你安装了命令行工具(Xcode> Preferences> Downloads),那么该文件出现在/usr/include/stdlib.h
。
- 1. 什么是SLDataLocator_AndroidSimpleBufferQueue(Android 4.3)?
- 2. 什么是g ++ - mp-4.3?
- 3. 为什么stdlib.h中没有strtoi?
- 4. 为什么有时是很难看到在Xcode 4.3
- 5. C++中stdlib.h和cstdlib之间的主要区别是什么?
- 6. xcode项目中的文件位置的默认设置是什么?
- 7. 上的Xcode 4.3
- 8. 进入xcode 4最后修改位置的热键是什么?
- 9. Xcode 4.3是否支持distcc?
- 10. Ionic2中图像的位置是什么?
- 11. Xcode + GitHub。什么是正确的设置
- 12. 什么是Xcode 4.3中的标题搜索路径?如何使用它?
- 13. 春季4.3什么是<task:annotation-driven>的注释4.3
- 14. 为什么Xcode 4.3将@interface ClassName()放入实现文件中?
- 15. cstdlib和stdlib.h有什么区别?
- 16. 的Xcode 4.3雪豹
- 17. Xcode 4.3/iOS 5.1
- 18. XCode 4.3和SVN
- 19. 约在Xcode 4.3
- 20. XCode 4.3 Singletons
- 21. phonegap xcode 4.3
- 22. XCode 4.3与WCF
- 23. iPhone模拟器4.3与xcode 4不显示当前位置
- 24. “初始位置”在Xcode的nib编辑器中做了什么?
- 25. XCode 4.3 Storyboards:为什么一些UIViewControllers的大小是1024而其他的320
- 26. 位置独立可执行文件的正确Xcode设置是什么
- 27. Xcode:什么是LastUpgradeCheck?
- 28. XCode 4.3 - 卸载XCode 4.2
- 29. 回滚XCode 4.4到XCode 4.3
- 30. Xcode 4.3为按钮设置属性
不能说4.3左右,但在我的机器上用XCode 4.2'找到stdlib.h | grep/stdlib \ .h $'outputs '/Developer/SDKs/MacOSX10.6.sdk/usr/include/C++/4.2.1/tr1/stdlib.h' '/Developer/SDKs/MacOSX10.6.sdk/usr/include/stdlib.h' '/ usr/include/C++/4.2.1/tr1/stdlib.h' '/ usr/include/stdlib.h' – 2012-02-22 18:08:15
@darkmist Apple已将Xcode 4.3捆绑到单个应用程序包,现在很难找到东西... – 2012-02-22 19:07:35