我正在尝试在此Wiki之后在Mac OS 10.11上编译VLCKit:https://wiki.videolan.org/VLCKit/
我有克隆git://git.videolan.org/vlc-bindings/VLCKit.git然后在Xcode 8.0中打开VLCKit.xcodeproj,最后运行“Build Everything”。
但是由于问题导致构建失败:
'checking for C/C++ restrict keyword... __restrict
checking whether xcrun clang++ supports C++11 features by default... no
checking whether xcrun clang++ supports C++11 features with -std=c++11... no
checking whether xcrun clang++ supports C++11 features with -std=c++0x... no
configure: error: *** A compiler with support for C++11 language features is required.
Command /bin/sh failed with exit code 1
** BUILD FAILED **
The following build commands failed:
PhaseScriptExecution configure build/VLCKit.build/Debug/Run\ VLC\ configure.build/Script-63FFDBCD0D2AE2AE0092FC96.sh
(1 failure)
make: *** [build/Debug/VLCKit.framework] Error 65'
答案 0 :(得分:2)
我遇到了同样的问题,但我可以通过将std=c++11 -stdlib=libc++
添加到Configure.sh
中导出的CXX标记来通过这些检查,因此该部分如下所示:
if test $arch = "x86_64"; then
export CFLAGS="-m64 -arch x86_64 $optim"
export CXXFLAGS="-m64 -arch x86_64 -std=c++11 -stdlib=libc++ $optim"
export OBJCFLAGS="-m64 -arch x86_64 $optim"
export CPPFLAGS="-m64 -arch x86_64 $optim"
this_args="--build=x86_64-apple-darwin15 --with-contrib=$VLC_SRC_DIR/contrib/x86_64-apple-darwin15 $this_args"
export PKG_CONFIG_PATH=$VLC_SRC_DIR/contrib/x86_64-apple-darwin11/lib/pkgconfig
fi
希望有所帮助!