对于我的硕士论文,我计划扩展一年前解决同一问题的人编写的代码。这是一个使用CGAL的VS 2013解决方案。但是,我无法成功构建以前的代码。当我尝试时,我得到了一个巨大的错误列表,所有错误都位于vs'拥有像< algorithm>这样的STL文件和< xmemory>。一些CGAL标题中也存在一些IntelliSense错误。由于错误显然不能出现在STL文件中,我认为我必须以某种方式破坏我的CGAL构建,但我不知道出了什么问题。有谁知道这些错误是如何造成的?
总共有3641个错误(但大多数都是在STL文件中,因此没有意义)。以下是其中一些:
Error 3517 error C4430: missing type specifier - int assumed. Note: C++ does not support default-int c:\program files (x86)\microsoft visual studio 12.0\vc\include\algorithm 462
Error 3518 error C2374: 'std::pair' : redefinition; multiple initialization c:\program files (x86)\microsoft visual studio 12.0\vc\include\algorithm 462
Error 3519 error C2988: unrecognizable template declaration/definition c:\program files (x86)\microsoft visual studio 12.0\vc\include\algorithm 462
Error 3520 error C2059: syntax error : '<' c:\program files (x86)\microsoft visual studio 12.0\vc\include\algorithm 462
Error 3521 error C2143: syntax error : missing ';' before '{' c:\program files (x86)\microsoft visual studio 12.0\vc\include\algorithm 479
Error 3522 error C2447: '{' : missing function header (old-style formal list?) c:\program files (x86)\microsoft visual studio 12.0\vc\include\algorithm 479
Error 3523 error C2143: syntax error : missing ';' before '<' c:\program files (x86)\microsoft visual studio 12.0\vc\include\algorithm 496
Error 3524 error C2433: 'pair' : 'inline' not permitted on data declarations c:\program files (x86)\microsoft visual studio 12.0\vc\include\algorithm 496
Error 3525 error C1003: error count exceeds 100; stopping compilation c:\program files (x86)\microsoft visual studio 12.0\vc\include\algorithm 496
3556 IntelliSense: identifier "DBL_MAX_EXP" is undefined c:\dev\CGAL-4.9\include\CGAL\CORE\BigFloatRep.h 189
3552 IntelliSense: identifier "mpz_srcptr" is undefined c:\dev\CGAL-4.9\include\CGAL\CORE\BigInt.h 142
3553 IntelliSense: identifier "mpz_srcptr" is undefined c:\dev\CGAL-4.9\include\CGAL\CORE\BigInt.h 259
3554 IntelliSense: identifier "mpz_ptr" is undefined c:\dev\CGAL-4.9\include\CGAL\CORE\BigInt.h 263
3555 IntelliSense: identifier "gmp_randstate_t" is undefined c:\dev\CGAL-4.9\include\CGAL\CORE\BigInt.h 549
3585 IntelliSense: identifier "mpq_init" is undefined c:\dev\CGAL-4.9\include\CGAL\CORE\BigRat.h 45
3586 IntelliSense: identifier "mpq_init" is undefined c:\dev\CGAL-4.9\include\CGAL\CORE\BigRat.h 49
3587 IntelliSense: identifier "mpq_set" is undefined c:\dev\CGAL-4.9\include\CGAL\CORE\BigRat.h 50
3588 IntelliSense: identifier "mpq_init" is undefined c:\dev\CGAL-4.9\include\CGAL\CORE\BigRat.h 53
3589 IntelliSense: identifier "mpq_set_si" is undefined c:\dev\CGAL-4.9\include\CGAL\CORE\BigRat.h 54
以下是我的CGAL版本的构建输出:
== Setting paths ==
Build CGAL from release in directory CGAL-4.9
Packagenames: CGAL-4.9
== Setting paths (DONE) ==
== Generate version files ==
CGAL_MAJOR_VERSION=4
CGAL_MINOR_VERSION=9
CGAL_BUGFIX_VERSION=0
CGAL_SONAME_VERSION=12
CGAL_SOVERSION =12.0.0
CGAL_REFERENCE_CACHE_DIR=
Building shared libraries
Visual Leak Detector (VLD) is not found.
Targetting Visual Studio 12 2013
Target build enviroment supports auto-linking
Using VC12 compiler.
Generator uses intermediate configuration directory: $(Configuration)
USING CMake version: 3.7.0
System: Windows
== Generate version files (DONE) ==
== Set up flags ==
Build type: Release
USING CXXFLAGS = '/DWIN32 /D_WINDOWS /W3 /GR /EHsc -D_CRT_SECURE_NO_DEPRECATE -D_SCL_SECURE_NO_DEPRECATE -D_CRT_SECURE_NO_WARNINGS -D_SCL_SECURE_NO_WARNINGS /fp:strict /fp:except- /wd4503 /bigobj /MD /O2 /Ob2 /DNDEBUG'
USING LDFLAGS = '/machine:X86 /INCREMENTAL:NO'
== Set up flags (DONE) ==
== Detect external libraries ==
External libraries supported: GMP;MPFR;ZLIB;OpenGL;LEDA;MPFI;RS;RS3;OpenNL;Eigen3;BLAS;LAPACK;QGLViewer;ESBTL; Coin3D;NTL;IPE
Preconfiguring library: GMP ...
GMP has been preconfigured:
UseGMP-file:
GMP include: C:/dev/CGAL-4.9/auxiliary/gmp/include
GMP libraries: C:/dev/CGAL-4.9/auxiliary/gmp/lib/libgmp-10.lib
GMP definitions:
USING GMP_VERSION = '5.0.1'
Preconfiguring library: MPFR ...
MPFR has been preconfigured:
UseMPFR-file:
MPFR include: C:/dev/CGAL-4.9/auxiliary/gmp/include
MPFR libraries: C:/dev/CGAL-4.9/auxiliary/gmp/lib/libmpfr-4.lib
MPFR definitions:
USING MPFR_VERSION = '3.0.0'
[ C:/Program Files/CMake/share/cmake-3.7/Modules/FindBoost.cmake:983 ] _boost_TEST_VERSIONS = 1.69.1;1.69.0;1.69;1.68.1;1.68.0;1.68;1.67.1;1.67.0;1.67;1.66.1;1.66.0;1.66;1.65.1;1.65.0;1.65;1.64.1;1.64.0;1.64;1.63.1;1.63.0;1.63;1.62.1;1.62.0;1.62;1.61.1;1.61.0;1.61;1.60.1;1.60.0;1.60;1.59.1;1.59.0;1.59;1.58.1;1.58.0;1.58;1.57.1;1.57.0;1.57;1.56.1;1.56.0;1.56;1.55.1;1.55.0;1.55;1.54.1;1.54.0;1.54;1.53.1;1.53.0;1.53;1.52.1;1.52.0;1.52;1.51.1;1.51.0;1.51;1.50.1;1.50.0;1.50;1.49.1;1.49.0;1.49;1.48.1;1.48.0;1.48;1.62.0;1.62;1.61.0;1.61;1.60.0;1.60;1.59.0;1.59;1.58.0;1.58;1.57.0;1.57;1.56.0;1.56;1.55.0;1.55;1.54.0;1.54;1.53.0;1.53;1.52.0;1.52;1.51.0;1.51;1.50.0;1.50;1.49.0;1.49;1.48.0;1.48
[ C:/Program Files/CMake/share/cmake-3.7/Modules/FindBoost.cmake:985 ] Boost_USE_MULTITHREADED = TRUE
[ C:/Program Files/CMake/share/cmake-3.7/Modules/FindBoost.cmake:987 ] Boost_USE_STATIC_LIBS = OFF
[ C:/Program Files/CMake/share/cmake-3.7/Modules/FindBoost.cmake:989 ] Boost_USE_STATIC_RUNTIME =
[ C:/Program Files/CMake/share/cmake-3.7/Modules/FindBoost.cmake:991 ] Boost_ADDITIONAL_VERSIONS = 1.69.1;1.69.0;1.69;1.68.1;1.68.0;1.68;1.67.1;1.67.0;1.67;1.66.1;1.66.0;1.66;1.65.1;1.65.0;1.65;1.64.1;1.64.0;1.64;1.63.1;1.63.0;1.63;1.62.1;1.62.0;1.62;1.61.1;1.61.0;1.61;1.60.1;1.60.0;1.60;1.59.1;1.59.0;1.59;1.58.1;1.58.0;1.58;1.57.1;1.57.0;1.57;1.56.1;1.56.0;1.56;1.55.1;1.55.0;1.55;1.54.1;1.54.0;1.54;1.53.1;1.53.0;1.53;1.52.1;1.52.0;1.52;1.51.1;1.51.0;1.51;1.50.1;1.50.0;1.50;1.49.1;1.49.0;1.49;1.48.1;1.48.0;1.48;1.47.1;1.47.0;1.47;1.46.1;1.46.0;1.46;1.45.1;1.45.0;1.45;1.44.1;1.44.0;1.44;1.43.1;1.43.0;1.43;1.42.1;1.42.0;1.42;1.41.1;1.41.0;1.41;1.40.1;1.40.0;1.40;1.39.1;1.39.0;1.39;1.38.1;1.38.0;1.38;1.37.1;1.37.0;1.37
[ C:/Program Files/CMake/share/cmake-3.7/Modules/FindBoost.cmake:993 ] Boost_NO_SYSTEM_PATHS =
[ C:/Program Files/CMake/share/cmake-3.7/Modules/FindBoost.cmake:1061 ] Declared as CMake or Environmental Variables:
[ C:/Program Files/CMake/share/cmake-3.7/Modules/FindBoost.cmake:1063 ] BOOST_ROOT = C:/boost/boost_1_63_0
[ C:/Program Files/CMake/share/cmake-3.7/Modules/FindBoost.cmake:1065 ] BOOST_INCLUDEDIR =
[ C:/Program Files/CMake/share/cmake-3.7/Modules/FindBoost.cmake:1067 ] BOOST_LIBRARYDIR = C:/boost/boost_1_63_0/lib64-msvc-12.0
[ C:/Program Files/CMake/share/cmake-3.7/Modules/FindBoost.cmake:1069 ] _boost_TEST_VERSIONS = 1.69.1;1.69.0;1.69;1.68.1;1.68.0;1.68;1.67.1;1.67.0;1.67;1.66.1;1.66.0;1.66;1.65.1;1.65.0;1.65;1.64.1;1.64.0;1.64;1.63.1;1.63.0;1.63;1.62.1;1.62.0;1.62;1.61.1;1.61.0;1.61;1.60.1;1.60.0;1.60;1.59.1;1.59.0;1.59;1.58.1;1.58.0;1.58;1.57.1;1.57.0;1.57;1.56.1;1.56.0;1.56;1.55.1;1.55.0;1.55;1.54.1;1.54.0;1.54;1.53.1;1.53.0;1.53;1.52.1;1.52.0;1.52;1.51.1;1.51.0;1.51;1.50.1;1.50.0;1.50;1.49.1;1.49.0;1.49;1.48.1;1.48.0;1.48;1.62.0;1.62;1.61.0;1.61;1.60.0;1.60;1.59.0;1.59;1.58.0;1.58;1.57.0;1.57;1.56.0;1.56;1.55.0;1.55;1.54.0;1.54;1.53.0;1.53;1.52.0;1.52;1.51.0;1.51;1.50.0;1.50;1.49.0;1.49;1.48.0;1.48
[ C:/Program Files/CMake/share/cmake-3.7/Modules/FindBoost.cmake:1162 ] location of version.hpp: C:/boost/boost_1_63_0/boost/version.hpp
[ C:/Program Files/CMake/share/cmake-3.7/Modules/FindBoost.cmake:1186 ] version.hpp reveals boost 1.63.0
[ C:/Program Files/CMake/share/cmake-3.7/Modules/FindBoost.cmake:1272 ] guessed _boost_COMPILER = -vc120
[ C:/Program Files/CMake/share/cmake-3.7/Modules/FindBoost.cmake:1282 ] _boost_MULTITHREADED = -mt
[ C:/Program Files/CMake/share/cmake-3.7/Modules/FindBoost.cmake:1326 ] _boost_RELEASE_ABI_TAG = -
[ C:/Program Files/CMake/share/cmake-3.7/Modules/FindBoost.cmake:1328 ] _boost_DEBUG_ABI_TAG = -gd
[ C:/Program Files/CMake/share/cmake-3.7/Modules/FindBoost.cmake:1384 ] _boost_LIBRARY_SEARCH_DIRS_RELEASE = C:/boost/boost_1_63_0/lib64-msvc-12.0;NO_DEFAULT_PATH;NO_CMAKE_FIND_ROOT_PATH_boost_LIBRARY_SEARCH_DIRS_DEBUG = C:/boost/boost_1_63_0/lib64-msvc-12.0;NO_DEFAULT_PATH;NO_CMAKE_FIND_ROOT_PATH
CMake Warning at C:/Program Files/CMake/share/cmake-3.7/Modules/FindBoost.cmake:744 (message):
Imported targets not available for Boost version 106300
Call Stack (most recent call first):
C:/Program Files/CMake/share/cmake-3.7/Modules/FindBoost.cmake:848 (_Boost_COMPONENT_DEPENDENCIES)
C:/Program Files/CMake/share/cmake-3.7/Modules/FindBoost.cmake:1435 (_Boost_MISSING_DEPENDENCIES)
cmake/modules/CGAL_SetupBoost.cmake:28 (find_package)
cmake/modules/CGAL_SetupDependencies.cmake:85 (include)
CMakeLists.txt:673 (include)
CMake Warning at C:/Program Files/CMake/share/cmake-3.7/Modules/FindBoost.cmake:744 (message):
Imported targets not available for Boost version 106300
Call Stack (most recent call first):
C:/Program Files/CMake/share/cmake-3.7/Modules/FindBoost.cmake:848 (_Boost_COMPONENT_DEPENDENCIES)
C:/Program Files/CMake/share/cmake-3.7/Modules/FindBoost.cmake:1435 (_Boost_MISSING_DEPENDENCIES)
cmake/modules/CGAL_SetupBoost.cmake:28 (find_package)
cmake/modules/CGAL_SetupDependencies.cmake:85 (include)
CMakeLists.txt:673 (include)
[ C:/Program Files/CMake/share/cmake-3.7/Modules/FindBoost.cmake:1523 ] Searching for THREAD_LIBRARY_RELEASE: boost_thread-vc120-mt-1_63;boost_thread-vc120-mt;boost_thread-mt-1_63;boost_thread-mt;boost_thread
[ C:/Program Files/CMake/share/cmake-3.7/Modules/FindBoost.cmake:362 ] Boost_LIBRARY_DIR_RELEASE = C:/boost/boost_1_63_0/lib64-msvc-12.0 _boost_LIBRARY_SEARCH_DIRS_RELEASE = C:/boost/boost_1_63_0/lib64-msvc-12.0;NO_DEFAULT_PATH;NO_CMAKE_FIND_ROOT_PATH
[ C:/Program Files/CMake/share/cmake-3.7/Modules/FindBoost.cmake:1565 ] Searching for THREAD_LIBRARY_DEBUG: boost_thread-vc120-mt-gd-1_63;boost_thread-vc120-mt-gd;boost_thread-mt-gd-1_63;boost_thread-mt-gd;boost_thread-mt;boost_thread
[ C:/Program Files/CMake/share/cmake-3.7/Modules/FindBoost.cmake:362 ] Boost_LIBRARY_DIR_DEBUG = C:/boost/boost_1_63_0/lib64-msvc-12.0 _boost_LIBRARY_SEARCH_DIRS_DEBUG = C:/boost/boost_1_63_0/lib64-msvc-12.0;NO_DEFAULT_PATH;NO_CMAKE_FIND_ROOT_PATH
[ C:/Program Files/CMake/share/cmake-3.7/Modules/FindBoost.cmake:1523 ] Searching for SYSTEM_LIBRARY_RELEASE: boost_system-vc120-mt-1_63;boost_system-vc120-mt;boost_system-mt-1_63;boost_system-mt;boost_system
[ C:/Program Files/CMake/share/cmake-3.7/Modules/FindBoost.cmake:362 ] Boost_LIBRARY_DIR_RELEASE = C:/boost/boost_1_63_0/lib64-msvc-12.0 _boost_LIBRARY_SEARCH_DIRS_RELEASE = C:/boost/boost_1_63_0/lib64-msvc-12.0;NO_DEFAULT_PATH;NO_CMAKE_FIND_ROOT_PATH
[ C:/Program Files/CMake/share/cmake-3.7/Modules/FindBoost.cmake:1565 ] Searching for SYSTEM_LIBRARY_DEBUG: boost_system-vc120-mt-gd-1_63;boost_system-vc120-mt-gd;boost_system-mt-gd-1_63;boost_system-mt-gd;boost_system-mt;boost_system
[ C:/Program Files/CMake/share/cmake-3.7/Modules/FindBoost.cmake:362 ] Boost_LIBRARY_DIR_DEBUG = C:/boost/boost_1_63_0/lib64-msvc-12.0 _boost_LIBRARY_SEARCH_DIRS_DEBUG = C:/boost/boost_1_63_0/lib64-msvc-12.0;NO_DEFAULT_PATH;NO_CMAKE_FIND_ROOT_PATH
[ C:/Program Files/CMake/share/cmake-3.7/Modules/FindBoost.cmake:1635 ] Boost_FOUND = 1
Boost version: 1.63.0
Found the following Boost libraries:
thread
system
Boost include: C:/boost/boost_1_63_0
Boost libraries: optimized;C:/boost/boost_1_63_0/lib64-msvc-12.0/boost_thread-vc120-mt-1_63.lib;debug;C:/boost/boost_1_63_0/lib64-msvc-12.0/boost_thread-vc120-mt-gd-1_63.lib;optimized;C:/boost/boost_1_63_0/lib64-msvc-12.0/boost_system-vc120-mt-1_63.lib;debug;C:/boost/boost_1_63_0/lib64-msvc-12.0/boost_system-vc120-mt-gd-1_63.lib
Boost definitions:
USING BOOST_VERSION = '1.63.0'
== Detect external libraries (DONE) ==
== Write compiler_config.h ==
Performing Test CGAL_CFG_DENORMALS_COMPILE_BUG - Success
Performing Test CGAL_CFG_FPU_ROUNDING_MODE_UNWINDING_VC_BUG - Success
Performing Test CGAL_CFG_IEEE_754_BUG - Success
Performing Test CGAL_CFG_ISTREAM_INT_BUG - Success
Performing Test CGAL_CFG_MATCHING_BUG_5 - Success
Performing Test CGAL_CFG_MATCHING_BUG_6 - Failed
Performing Test CGAL_CFG_MATCHING_BUG_7 - Failed
Performing Test CGAL_CFG_MATCHING_BUG_8 - Success
Performing Test CGAL_CFG_NESTED_CLASS_FRIEND_DECLARATION_BUG - Failed
Performing Test CGAL_CFG_NO_LIMITS - Success
Performing Test CGAL_CFG_NO_NEXTAFTER - Failed
Performing Test CGAL_CFG_NO_STL - Success
Performing Test CGAL_CFG_NUMERIC_LIMITS_BUG - Success
Performing Test CGAL_CFG_OUTOFLINE_MEMBER_DEFINITION_BUG - Success
Performing Test CGAL_CFG_TEMPLATE_IN_DEFAULT_PARAMETER_BUG - Success
Performing Test CGAL_CFG_TYPENAME_BEFORE_DEFAULT_ARGUMENT_BUG - Success
Performing Test CGAL_CFG_USING_BASE_MEMBER_BUG_2 - Success
== Write compiler_config.h (DONE) ==
== Generating build files ==
Configuring libCGAL
Requested component: MPFR
Requested component: GMP
libCGAL is configured
Sources for CGAL component library 'CGAL_Core' detected
Configuring libCGAL_Core
Requested component: MPFR
Requested component: GMP
libCGAL_Core is configured
Sources for CGAL component library 'CGAL_ImageIO' detected
Configuring libCGAL_ImageIO
USING ZLIB_VERSION = '1.2.8'
Requested component: MPFR
Requested component: GMP
libCGAL_ImageIO is configured
Sources for CGAL component library 'CGAL_Qt5' detected
Configuring libCGAL_Qt5
libCGAL_Qt5 is missing the dependencies: Qt5OpenGL Qt5Svg Qt5 cannot be configured.
Sources for CGAL component libraries 'CGAL_Core;CGAL_ImageIO;CGAL_Qt5' detected
== Generating build files (DONE) ==
Configuring done
Generating done