Visual Studio 2012を搭載した64ビットWindowsマシンでvoxelterrainライブラリ(C ++、Ogre)を構築しようとしています。CMakeはエラーなしで実行されているようです(以下の出力を参照)。ライブラリをコンパイルしようとすると、いくつかのエラーが発生します。CMAKEについてはわかりませんが、コンパイラがC ++ 11を正しく解釈していないと思います。
例:このコード..。
template <class T>
using weakPointer = std::weak_ptr<T>;
このエラーが発生します:
error C2988: Unerkannte Vorlagendeklaration/-definition
error C2059: syntax error : 'using'
error C2143: syntax error : missing ';' before '{'
error C2447: '{': missing function header (old-style formal list?
ここにソースとCMAKEファイルがあります:
VoxelTerrainライブラリ:http://voxelterrain.com/index.html
CMakeファイル:https://github.com/qwertzui11/voxelTerrain/blob/master/CMakeLists.txt
CMake出力:
The C compiler identification is MSVC 17.0.61030.0
The CXX compiler identification is MSVC 17.0.61030.0
Check for working C compiler using: Visual Studio 11 2012 Win64
Check for working C compiler using: Visual Studio 11 2012 Win64 -- works
Detecting C compiler ABI info
Detecting C compiler ABI info - done
Check for working CXX compiler using: Visual Studio 11 2012 Win64
Check for working CXX compiler using: Visual Studio 11 2012 Win64 -- works
Detecting CXX compiler ABI info
Detecting CXX compiler ABI info - done
CMake Warning (dev) at CMakeLists.txt:20 (if):
Policy CMP0054 is not set: Only interpret if() arguments as variables or
keywords when unquoted. Run "cmake --help-policy CMP0054" for policy
details. Use the cmake_policy command to set the policy and suppress this
warning.
Quoted variables like "MSVC" will no longer be dereferenced when the policy
is set to NEW. Since the policy is not set the OLD behavior will be used.
This warning is for project developers. Use -Wno-dev to suppress it.
CMake Warning (dev) at CMakeLists.txt:26 (elseif):
Policy CMP0054 is not set: Only interpret if() arguments as variables or
keywords when unquoted. Run "cmake --help-policy CMP0054" for policy
details. Use the cmake_policy command to set the policy and suppress this
warning.
Quoted variables like "MSVC" will no longer be dereferenced when the policy
is set to NEW. Since the policy is not set the OLD behavior will be used.
This warning is for project developers. Use -Wno-dev to suppress it.
Boost version: 1.57.0
...
Looking for OGRE...
Found Ogre Xalafu (1.10.0)
...
Performing Test COMPILER_HAS_DEPRECATED_ATTR
Performing Test COMPILER_HAS_DEPRECATED_ATTR - Failed
Performing Test COMPILER_HAS_DEPRECATED
Performing Test COMPILER_HAS_DEPRECATED - Success
...
Configuring done
Generating done
ご協力いただきありがとうございます!
この記事では、Visual Studio2012はエイリアステンプレートをサポートしていないと述べています。
ただし、Visual Studio2013ではサポートされています。
この記事はインターネットから収集されたものであり、転載の際にはソースを示してください。
侵害の場合は、連絡してください[email protected]
コメントを追加