1

我使用 CMake 3.3.0-rc4 为 OpenTrack 生成了一个 Xcode 项目。但是,当我尝试在 Xcode 6.4 中构建 ALL_BUILD 目标时,我立即收到以下错误。

Libtool build/Debug/libopentrack-version.a normal x86_64
    cd /Users/david/Documents/Programming/OpenTrack
    export MACOSX_DEPLOYMENT_TARGET=10.10
        /Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/bin/libtool -static -arch_only x86_64 -syslibroot /Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX10.10.sdk -L/Users/user/Documents/Programming/OpenTrack/build/Debug -filelist /Users/user/Documents/Programming/OpenTrack/build/opentrack.build/Debug/opentrack-version.build/Objects-normal/x86_64/opentrack-version.LinkFileList -stdlib=libc++ -framework Cocoa -framework CoreFoundation -lobjc -lz -framework Carbon -o /Users/user/Documents/Programming/OpenTrack/build/Debug/libopentrack-version.a

error: /Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/bin/libtool: unknown option character `t' in: -stdlib=libc++
Usage: /Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/bin/libtool -static [-] file [...] [-filelist listfile[,dirname]] [-arch_only arch] [-sacLT] [-no_warning_for_no_symbols]
Usage: /Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/bin/libtool -dynamic [-] file [...] [-filelist listfile[,dirname]] [-arch_only arch] [-o output] [-install_name name] [-compatibility_version #] [-current_version #] [-seg1addr 0x#] [-segs_read_only_addr 0x#] [-segs_read_write_addr 0x#] [-seg_addr_table <filename>] [-seg_addr_table_filename <file_system_path>] [-all_load] [-noall_load]

该项目的构建设置具有以下用于链接/其他图书馆员标志的设置:

OTHER_LIBTOOLFLAGS = -stdlib=libc++ -framework Cocoa -framework CoreFoundation -lobjc -lz -framework Carbon

从上面的 libtool 使用声明来看,在我看来,这组选项是为完全不同的 libtool 版本生成的。我可以做什么(如果有的话)让这个项目使用当前版本的 Xcode 构建?

4

1 回答 1

0

您不能使用标志-stdlib=libc++-frameworkwith libtool,因为它们仅在链接器中有效,因此您应该将OTHER_LIBTOOLFLAGS其设为空,因为这些选项都不适用

于 2015-07-23T15:16:23.787 回答