安装boost和CGAL

来源:互联网 发布:淘宝商家手机怎么注册 编辑:程序博客网 时间:2024/04/30 10:22
 

boost安装提示
到http://www.boostpro.com/download下载boost的installer。这个东东要连网下载安装,而有时候下载速度很慢。如果你需要的模块东西少,可记下其下载的文件名,然后到http://sourceforge.net/projects/boost/files/用迅雷等工具下载。


CGAL安装提示
1)通过CGAL-3.5.1-Setup.exe和CGAL-3.4-Setup.exe下载安装的目录中都没有cgal编译好的lib库,估计要自己编译。CGAL-3.3.1-Setup.exe版本则直接提供了编译好的lib库。

2)CGAL需要的boost库是Multithread和Multithread Debug版本,是lib库,CGAL3.5.1不支持boost1.42.0版本,必须用之前的boost版,否则至少出现“error C2061: syntax error : identifier 'intmax_t'”之类的错误,如果非得要编译过去,可注释掉...\CGAL-3.5.1\auxiliary\gmp\include\mpfr.h文件中地48-50行(我就是这么干的)。

3)可参考http://blog.csdn.net/scarletty/archive/2009/05/24/4212703.aspx 《在vs2008下安装CGAL》来安装CGAL。但该文中使用的是qt的minGW版本,需要自己编译,否则用CMake生成CGAL的vs工程时报错“It appears you're trying to use Visual Studio with Qt built by mingw ”。网页http://n4.nabble.com/problem-with-CGAL-instalation-td950611.html上说“If you want to use Qt4 with Visual Studio 9, you need to recompile Qt yourself from sources. You seem to have installed Qt3 precompiled binaries for the MinGW compiler. ”。所以如果不想自己编译qt,需要下载专门的vs版本。qt新发布了Qt libraries 4.6.2 for Windows (VS 2008, 194 MB) (我用的就是这么版本)。

4)用CMake编译时,要加入基本变量Boost_INCLUDE_DIR (=C:/boost/boost_1_38_0), 并且编辑变量Boost_THREAD_LIBRARY_DEBUG (=C:/boost/boost_1_38_0/lib/libboost_thread-vc90-mt-gd-1_38.lib) 以及变量Boost_THREAD_LIBRARY_RELEASE (= C:/boost/boost_1_38_0/lib/libboost_thread-vc90-mt-1_38.lib)

5)编译后,生成的lib库中有所需的lib文件,include目录中有相应的头文件。

 

 

 

 

摘自:http://blog.3snews.net/html/02/3502-26499.html

原创粉丝点击