【发布时间】:2014-08-13 01:37:43
【问题描述】:
我正在尝试构建 wxFormBuilder_v3.5.0-beta-source。它带有一个用于创建构建文件的 shell 文件,但它总是遇到以下错误:
==== Building Premake4 ====
Linking Premake4
ld: library not found for -lstdc++-static
clang: error: linker command failed with exit code 1 (use -v to see invocation)
make[1]: *** [bin/release/premake4] Error 1
make: *** [Premake4] Error 2
./create_build_files4.sh: line 91: ./premake/macosx/bin/release/premake4: No such file or directory
./create_build_files4.sh: line 92: ./premake/macosx/bin/release/premake4: No such file or directory
./create_build_files4.sh: line 93: ./premake/macosx/bin/release/premake4: No such file or directory
./create_build_files4.sh: line 95: ./premake/macosx/bin/release/premake4: No such file or directory
我正在运行 Mac OS X 10.9.4,是的,我已经安装了 XCode,并且之前已经在这台机器上成功构建/安装了 C++ 项目。
我知道我必须先安装 wxWidgets 才能使其工作,并且我已经成功构建/编译/安装了 wxWidgets。
这是 shell 文件的第 87-96 行(我在行号前加上了前缀供您参考):
[87] # Build premake
[88] cd build
[89] make CONFIG=Release -C./premake/$platform
[90]
[91] ./premake/$platform/bin/release/premake4 --file=./premake/solution.lua $wxunicode $wxroot $wxversion $mediactrl $shared $arch codeblocks
[92] ./premake/$platform/bin/release/premake4 --file=./premake/solution.lua $wxunicode $wxroot $wxversion $mediactrl $shared $arch $rpath codelite
[93] ./premake/$platform/bin/release/premake4 --file=./premake/solution.lua $wxunicode $wxroot $wxversion $mediactrl $shared $arch $rpath gmake
[94] if [ "$platform" = "macosx" ]; then
[95] ./premake/$platform/bin/release/premake4 --file=./premake/solution.lua $wxunicode $wxroot $wxversion $mediactrl $shared $arch xcode3
[96] fi
我并不担心文件路径丢失。我尝试直接从正确的目录运行make,但仍然出现此错误:
==== Building Premake4 ====
Linking Premake4
ld: library not found for -lstdc++-static
clang: error: linker command failed with exit code 1 (use -v to see invocation)
make[1]: *** [bin/release/premake4] Error 1
make: *** [Premake4] Error 2
我主要关心的是找到-lstdc++-static 库并安装它,但我无法在网上找到它。我能找到的唯一与之相关的是在编译 iOS 应用程序时更改 XCode 中的设置,这里不是这种情况。任何需要进行的更改都需要在文本编辑器中进行。
【问题讨论】:
标签: c++ macos installation osx-mavericks