Windows 上的 CGAL:Boost 和 cmake 的问题
CGAL on Windows: Problems with Boost and cmake
我已经尝试使用 cmake-gui 构建 CGAL 已有一段时间了,但我一直遇到同样的错误。在 CmakeError.log 中,我得到了以下条目:
fatal error C1083: Datei (Include) kann nicht ge”ffnet werden: "boost/variant.hpp": No such file or directory
(Datei kann nicht geöffnet werden = 文件无法打开)
似乎找不到 boost include 目录,但我确信我已尽我所能:
1) 安装 boost_1_58_0-msvc-12.0-64.exe 到 C:\boost_1_58_0
2) 安装 CGAL-4.6.zip 到 C:\CGAL-4.6
3) 确保环境变量 BOOST_INCLUDEDIR 和 BOOST_LIBRARYDIR 分别设置为 C:\boost_1_58_0\ 和 C:\boost_1_58_0\lib64-msvc-12.0
4) 在CGAL目录下打开cmake-gui
5) 选择 "Visual Studio 12 2013 Win64" 作为 Compiler,然后点击 Configure。
Cmake然后就清楚的找到了Boost的安装:
Boost version: 1.58.0
Found the following Boost libraries:
thread
system
Boost include: C:/boost_1_58_0
Boost libraries: optimized;C:/boost_1_58_0/lib64-msvc-12.0/boost_thread- vc120-mt-1_58.lib;debug;C:/boost_1_58_0/lib64-msvc-12.0/boost_thread-vc120-mt-gd-1_58.lib;optimized;C:/boost_1_58_0/lib64-msvc-12.0/boost_system-vc120-mt-1_58.lib;debug;C:/boost_1_58_0/lib64-msvc-12.0/boost_system-vc120-mt-gd-1_58.lib
Boost definitions:
USING BOOST_VERSION = '1.58.0'
但无济于事,当 Cmake 编译 CGAL 时,它似乎无法访问 Boost 包含。除了上述步骤外,我还尝试了以下步骤:
1) 在cmake-gui中添加一个BOOST_ROOT变量,指向C:/boost_1_58_0.
2)检查cmake-gui中的"Advanced"并检查Boost_INCLUDE_DIR变量。它设置为 C:/boost_1_58_0
3) 我将变量的输入更改为 C:/boost_1_58_0/boost
4) 将 CGAL_Boost_USE_STATIC_LIBS 设置为 1
没有任何帮助。求助!
尝试了很多不同的 configuration/software version/compiler 组合,我找到了问题的根源:是 cmake 本身。至少在其最新版本中。
我降级到 CMake 版本 3.1.3,它起作用了。
Laurent Rineau(CGAL 发布经理)编辑:
事实上,CGAL-4.6 中的 CMake 脚本与 CMake-3.3rc2 不兼容。 CGAL 开发人员 discovered that bug coincidentally four days ago, and it is already fixed in CGAL-4.6.1。 CGAL-4.6.1 将在今天 (2015/06/26) 或 2015/06/29 星期一发布。
我已经尝试使用 cmake-gui 构建 CGAL 已有一段时间了,但我一直遇到同样的错误。在 CmakeError.log 中,我得到了以下条目:
fatal error C1083: Datei (Include) kann nicht ge”ffnet werden: "boost/variant.hpp": No such file or directory
(Datei kann nicht geöffnet werden = 文件无法打开)
似乎找不到 boost include 目录,但我确信我已尽我所能:
1) 安装 boost_1_58_0-msvc-12.0-64.exe 到 C:\boost_1_58_0
2) 安装 CGAL-4.6.zip 到 C:\CGAL-4.6
3) 确保环境变量 BOOST_INCLUDEDIR 和 BOOST_LIBRARYDIR 分别设置为 C:\boost_1_58_0\ 和 C:\boost_1_58_0\lib64-msvc-12.0
4) 在CGAL目录下打开cmake-gui
5) 选择 "Visual Studio 12 2013 Win64" 作为 Compiler,然后点击 Configure。
Cmake然后就清楚的找到了Boost的安装:
Boost version: 1.58.0
Found the following Boost libraries:
thread
system
Boost include: C:/boost_1_58_0
Boost libraries: optimized;C:/boost_1_58_0/lib64-msvc-12.0/boost_thread- vc120-mt-1_58.lib;debug;C:/boost_1_58_0/lib64-msvc-12.0/boost_thread-vc120-mt-gd-1_58.lib;optimized;C:/boost_1_58_0/lib64-msvc-12.0/boost_system-vc120-mt-1_58.lib;debug;C:/boost_1_58_0/lib64-msvc-12.0/boost_system-vc120-mt-gd-1_58.lib
Boost definitions:
USING BOOST_VERSION = '1.58.0'
但无济于事,当 Cmake 编译 CGAL 时,它似乎无法访问 Boost 包含。除了上述步骤外,我还尝试了以下步骤:
1) 在cmake-gui中添加一个BOOST_ROOT变量,指向C:/boost_1_58_0.
2)检查cmake-gui中的"Advanced"并检查Boost_INCLUDE_DIR变量。它设置为 C:/boost_1_58_0
3) 我将变量的输入更改为 C:/boost_1_58_0/boost
4) 将 CGAL_Boost_USE_STATIC_LIBS 设置为 1
没有任何帮助。求助!
尝试了很多不同的 configuration/software version/compiler 组合,我找到了问题的根源:是 cmake 本身。至少在其最新版本中。
我降级到 CMake 版本 3.1.3,它起作用了。
Laurent Rineau(CGAL 发布经理)编辑: 事实上,CGAL-4.6 中的 CMake 脚本与 CMake-3.3rc2 不兼容。 CGAL 开发人员 discovered that bug coincidentally four days ago, and it is already fixed in CGAL-4.6.1。 CGAL-4.6.1 将在今天 (2015/06/26) 或 2015/06/29 星期一发布。