我想在Mac OS X 10.9下使用xcrun
構建現有的應用程序。該應用程序與libxml集成。它配備了包括如:xcrun:如何添加到標題搜索路徑?
#include <libxml/parser.h>
爲了測試,我跑:
echo '#include <libxml/parser.h>' | xcrun clang -xc -v -
這給了我
#include "..." search starts here:
#include <...> search starts here:
/Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/bin/../lib/clang/5.0/include
/Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/include
/Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX10.9.sdk/usr/include
/Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX10.9.sdk/System/Library/Frameworks (framework directory)
End of search list.
<stdin>:1:10: fatal error: 'libxml/parser.h' file not found
#include <libxml/parser.h>
雖然臨界頭搜索路徑xcrun
下顯得起來,libxml2的是失蹤。作爲事實上,libxml的/ *^h居住在
/Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX10.9.sdk/usr/include
即
/Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX10.9.sdk/usr/include/libxml2
一個子目錄我如何添加這個目錄(.../usr/include目錄/ libxml2的)到搜索路徑尊重xcrun
?
我應該說:我想通過命令行添加它,最好。 – mrcalvin