我看到許多關於此問題的相同問題。恐怕他們的答案都不適合我。CMake無法找到增強庫(CGAL,Windows)
我正在嘗試安裝CGAL。我按照following tutorial一步一步描述了這個過程。唯一的區別是我使用的是CodeBlocks,而且我選擇了「指定本機編譯器」,並指出它們是mingw32-gcc.exe
和mingw32-g++.exe
,這似乎很好。當我運行cmake貴然後單擊配置,我得到下面的輸出,與高級選項打勾:
The CXX compiler identification is GNU 4.4.1
The C compiler identification is GNU 4.4.1
Check for working CXX compiler: E:/Program Files (x86)/CodeBlocks/MinGW/bin/mingw32-g++.exe
Check for working CXX compiler: E:/Program Files (x86)/CodeBlocks/MinGW/bin/mingw32-g++.exe -- works
Detecting CXX compiler ABI info
Detecting CXX compiler ABI info - done
Check for working C compiler: E:/Program Files (x86)/CodeBlocks/MinGW/bin/mingw32-gcc.exe
Check for working C compiler: E:/Program Files (x86)/CodeBlocks/MinGW/bin/mingw32-gcc.exe -- works
Detecting C compiler ABI info
Detecting C compiler ABI info - done
== Setting paths ==
Build CGAL from release in directory CGAL-4.6
Packagenames: CGAL-4.6
== Setting paths (DONE) ==
== Generate version files ==
CGAL_MAJOR_VERSION=4
CGAL_MINOR_VERSION=6
CGAL_BUGFIX_VERSION=0
CGAL_SONAME_VERSION=11
CGAL_SOVERSION =11.0.0
CGAL_REFERENCE_CACHE_DIR=
Building shared libraries
Targetting MinGW Makefiles
Using E:/Program Files (x86)/CodeBlocks/MinGW/bin/mingw32-g++.exe compiler.
USING CMake version: 2.8.8
System: Windows
USING GCC_VERSION = '4.4.1'
Using gcc version 4 or later. Adding -frounding-math
== Generate version files (DONE) ==
== Set up flags ==
Build type: Release
USING CXXFLAGS = ' -frounding-math -O3 -DNDEBUG'
USING LDFLAGS = ' '
== 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 ...
Found GMP: e:/Users/Bombax/Cpp/Libraries/CGAL-4.6/auxiliary/gmp/lib/libgmp-10.dll
GMP has been preconfigured:
UseGMP-file:
GMP include: e:/Users/Bombax/Cpp/Libraries/CGAL-4.6/auxiliary/gmp/include
GMP libraries: e:/Users/Bombax/Cpp/Libraries/CGAL-4.6/auxiliary/gmp/lib/libgmp-10.dll
GMP definitions:
USING GMP_VERSION = '5.0.1'
Preconfiguring library: MPFR ...
Found MPFR: e:/Users/Bombax/Cpp/Libraries/CGAL-4.6/auxiliary/gmp/lib/libmpfr-4.dll
MPFR has been preconfigured:
UseMPFR-file:
MPFR include: e:/Users/Bombax/Cpp/Libraries/CGAL-4.6/auxiliary/gmp/include
MPFR libraries: e:/Users/Bombax/Cpp/Libraries/CGAL-4.6/auxiliary/gmp/lib/libmpfr-4.dll
MPFR definitions:
USING MPFR_VERSION = '3.0.0'
CMake Error at E:/Program Files (x86)/CMake 2.8/share/cmake-2.8/Modules/FindBoost.cmake:1200 (message):
Unable to find the requested Boost libraries.
Boost version: 1.58.0
Boost include path: e:/Users/Bombax/Cpp/Libraries/boost_1_58_0
The following Boost libraries could not be found:
boost_thread
boost_system
No Boost libraries were found. You may need to set BOOST_LIBRARYDIR to the
directory containing Boost libraries or BOOST_ROOT to the location of
Boost.
Call Stack (most recent call first):
cmake/modules/CGAL_SetupBoost.cmake:6 (find_package)
cmake/modules/CGAL_SetupDependencies.cmake:85 (include)
CMakeLists.txt:640 (include)
Boost include: e:/Users/Bombax/Cpp/Libraries/boost_1_58_0
Boost libraries:
Boost definitions:
USING BOOST_VERSION = '1.58.0'
== Detect external libraries (DONE) ==
== Write compiler_config.h ==
Performing Test CGAL_CFG_BOOST_VARIANT_SWAP_BUG - Failed
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 - Success
Performing Test CGAL_CFG_MATCHING_BUG_7 - Success
Performing Test CGAL_CFG_MATCHING_BUG_8 - Success
Performing Test CGAL_CFG_NESTED_CLASS_FRIEND_DECLARATION_BUG - Success
Performing Test CGAL_CFG_NO_LIMITS - Success
Performing Test CGAL_CFG_NO_NEXTAFTER - Success
Performing Test CGAL_CFG_NO_STL - Success
Performing Test CGAL_CFG_NO_WARNING_CPP_DIRECTIVE_BUG - 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
Found OpenGL: opengl32
Could NOT find ZLIB (missing: ZLIB_LIBRARY ZLIB_INCLUDE_DIR)
OpenGL include:
OpenGL libraries: glu32;opengl32
Requested component: MPFR
Requested component: GMP
libCGAL_ImageIO is configured
NOTICE: libCGAL_ImageIO needs ZLib to read compressed files. That feature will not be activated.
Sources for CGAL component library 'CGAL_Qt3' detected
Configuring libCGAL_Qt3
libCGAL_Qt3 needs Qt3, cannot be configured.
Sources for CGAL component library 'CGAL_Qt4' detected
Configuring libCGAL_Qt4
libCGAL_Qt4 needs Qt4, cannot be configured.
Sources for CGAL component libraries 'CGAL_Core;CGAL_ImageIO;CGAL_Qt3;CGAL_Qt4' detected
== Generating build files (DONE) ==
Configuring incomplete, errors occurred!
我確實設置BOOST_ROOT
在CMake的GUI的一個路徑,以e:/Users/Bombax/Cpp/Libraries/boost_1_58_0
,它存在。它提到的兩個庫肯定是安裝的。我注意到,在我的升級安裝中沒有明確包含文件夾(儘管它們是libs)。我試過檢查CGAL_Boost_USE_STATIC_LIBS選項沒有更好的結果。這裏發生了什麼?我需要做什麼?
如果您想在項目中使用boost庫,則需要使用boost includes。如果您只是將已構建的可執行文件/庫與動態增壓歸檔鏈接起來,則不需要包含這些內容。 – huu
然後我下載了錯誤的提示嗎?我在這裏下載了ZIP文件:http://sourceforge.net/projects/boost/files/boost/1.58.0/boost_1_58_0.zip/download – bombax
解壓縮歸檔文件後,包含文件位於'boost_1_58_0/boost'中。 – huu