請告訴我,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