在Linux上与OSXCross交叉编译时,libc ++头文件在哪里?

时间:2017-12-01 13:26:20

标签: linux macos clang cross-compiling libc++

这就是我正在做的事情:

SDK_URL=https://github.com/phracker/MacOSX-SDKs/releases/download/10.13/MacOSX10.10.sdk.tar.xz
git clone "https://github.com/tpoechtrager/osxcross.git" osxcross
mkdir -p osxcross/tarballs
curl -sSL "$SDK_URL" -o "osxcross/tarballs/MacOSX10.10.sdk.tar.xz"
cd osxcross && UNATTENDED=1 ./build.sh

我以为我不需要其他任何东西来编译,但是在构建项目时我遇到了这个错误:

/home/travis/osxcross/target/bin/i386-apple-darwin14-c++ -o platform/osx/sem_osx.osx.tools.32.o -c -g3 -DDEBUG_ENABLED -DDEBUG_MEMORY_ENABLED -w -DFT2_BUILD_LIBRARY -DZLIB_DEBUG -DFREETYPE_ENABLED -DDEBUG_MEMORY_ALLOC -DSCI_NAMESPACE -DENABLE_DEPRECATED -DAPPLE_STYLE_KEYS -DUNIX_ENABLED -DGLES2_ENABLED -DOSX_ENABLED -mmacosx-version-min=10.9 -DTOOLS_ENABLED -DGDSCRIPT_ENABLED -DMINIZIP_ENABLED -DXML_ENABLED -DGLEW_STATIC -DGLEW_ENABLED -Icore -Icore/math -Ieditor -Idrivers -I. -Iplatform/osx -Ithirdparty/zlib -Ithirdparty/glew -Ithirdparty/freetype -Ithirdparty/freetype/include -Ithirdparty/libpng platform/osx/sem_osx.cpp
osxcross: error: cannot find libc++ headers
osxcross: error: while detecting target

我没有看到readme file中与libc ++路径相关的任何内容,谷歌搜索解决方案时唯一出现的问题是它可能是bug in clang,但我不是肯定的。

当我尝试构建macOS时,输出-H到clang:

#include "..." search starts here:
#include <...> search starts here:
 core
 core/math
 editor
 drivers
 .
 platform/osx
 thirdparty/zlib
 thirdparty/glew
 thirdparty/freetype
 thirdparty/freetype/include
 thirdparty/libpng
 /Users/user/Downloads/osxcross-master/target/bin/../SDK/MacOSX10.13.sdk/usr/include/c++/v1
 /Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/lib/clang/9.0.0/include
 /Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/include
 /Users/user/Downloads/osxcross-master/target/bin/../SDK/MacOSX10.13.sdk/usr/include
 /Users/user/Downloads/osxcross-master/target/bin/../SDK/MacOSX10.13.sdk/System/Library/Frameworks (framework directory)
End of search list.

0 个答案:

没有答案