我正在尝试为 iOS 编译OpenFST,这是 make 失败的地方:
cd openfst-1.6.5/src/lib
/Applications/Xcode.app/Contents/Developer/usr/bin/g++
-DHAVE_CONFIG_H
-I./../include
-I/Applications/Xcode.app/Contents/Developer/Platforms/iPhoneOS.platform/Developer/SDKs/iPhoneOS.sdk/usr/include/c++/4.2.1/
-I/Applications/Xcode.app/Contents/Developer/Platforms/iPhoneOS.platform/Developer/SDKs/iPhoneOS.sdk/usr/include/
-miphoneos-version-min=8.1
-arch armv7
-fno-exceptions
-funsigned-char
-pipe
-no-cpp-precomp
-isysroot /Applications/Xcode.app/Contents/Developer/Platforms/iPhoneOS.platform/Developer/SDKs/iPhoneOS.sdk
-std=c++11
-MT compat.lo -MD -MP -MF .deps/compat.Tpo -c compat.cc -o compat.o
它抛出了许多类似的错误,比如这些
/../iPhoneOS.sdk/usr/include/c++/4.2.1/cwchar:212:12:
error: cannot initialize return object of type
'wchar_t *' with an rvalue of type 'const wchar_t *'
{ return wcschr(const_cast<const wchar_t*>(__p), __c); }
^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
/../iPhoneOS.sdk/usr/include/c++/4.2.1/cwchar:218:12:
error: cannot initialize return object of type
'wchar_t *' with an rvalue of type 'const wchar_t *'
{ return wcspbrk(const_cast<const wchar_t*>(__s1), __s2); }
^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
/../usr/include/c++/v1/tuple:1352:22:
error: C++ requires a type specifier for all declarations
pair<_T1, _T2>::pair(piecewise_construct_t,
^
/../usr/include/c++/v1/tuple:1351:1:
error: declarator requires an identifier
inline _LIBCPP_INLINE_VISIBILITY
^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
我觉得我在这里使用了错误的 c++ 版本还是什么?