`
huozheleisi
  • 浏览: 1235840 次
文章分类
社区版块
存档分类
最新评论

c++数学计算库CGAL环境设置

 
阅读更多

The following is one way of installing CGAL on windows (Written by Itay Harel):

1) Install Microsoft Visual Studio 2008(Version 9).
2) Install BOOST.
Activate the boost installer from within the link below (supplied by Efi Fogel):
http://www.boost-consulting.com/download.html
A wizard opens. After a few stages you are required to select your version of visual studio.
In the variant checkboxes, I checked them all since I didn't know which type of built libraries I need.
The next screen displays all boost components. Again, I left them all selected since I didn't know I which of boost component CGAL uses.
3) Install CGAL.
Fill the short questionair in http://www.cgal.org/download/index.html (link by Efi Fogel).
After submittion, you’ll be directed to the downloading screen.
Download CGAL 3.2.1, Windows Installer EXE (14.2MB) and run it.
Notice that it also installs GMP and MPFR (let it install all component.
Important note:
There is a good change that the installer might report near the end that it cannot find some file that it need to set some parameters in. These are path name where visual studio should look for CGAL components.

4) Open visual studio. Choose the Tools menu. Choose options. Go to the projects tab.
Select VC++ Directories.
On the upper right corner select ‘Include Files’. If you got the 4 error messages in the CGAL installation now is the time to manually add the include paths.
Add:

a. $(CGALROOT)/include

b. $(CGALROOT)/include/CGAL/config/msvc7

c. $(CGALROOT)/auxiliary/gmp/include

d. $(CGALROOT)/auxiliary/taucs/include

e. $(CGALROOT)/auxiliary/zlib/include
Also, if you can’t see $(BOOST)/ anywhere, add it.
Now select ‘Library files’ (in the upper right corner).
Verify/Add the following:

f. $(CGALROOT)/lib/msvc7

g. $(CGALROOT)/auxiliary/gmp/lib

h. $(CGALROOT)/auxiliary/taucs/lib

i. $(CGALROOT)/auxiliary/zlib/lib

j. $(BOOST)/lib

5) Install Glut
A small change was made in glut.h to make it work (according to http://www.experts-exchange.com/Programming/Programming_Languages/Cplusplus/Q_20745841.html)

a. Put glut32.dll in %WinDir%/System (e.g. C:/Windows/System).

b. Put glut.h in …/Microsoft Visual Studio .NET/Vc7/PlatformSDK/Include/gl

c. Put glut32.lib in …/Microsoft Visual Studio .NET/Vc7/PlatformSDK/Lib

至此,环境配置完成。下面测试历程:

6) Copy one of the projects in …/CGAL-3.2.1/examples to your projects folder.
For example:
CGAL-3.2.1/examples/Polygon/Example.vcproj (You can rename it later) and
CGAL-3.2.1/examples/Polygon/Example.c

7) Open that project. Try to build the solution (You’ll be asked to save the solution first).
Try to run it.

8) If all goes well, remove the existing C/CPP or H files from the project.
Copy the sample program files provided by Ophir to your project library.
Add them to the solution.

9) Open the ‘Assign2.cpp’ and remove the first include line (#include <GL/gl.h>)

10) Try to build the solution.
Add the input text file to the command line parameters in Project->Properties
->configuration Properties->Debugging.

11) Try to run the program.

另外,按照上述配置的环境只能在Release下工作。下面是在Release上可调试的做法:

问题:在release模式下如何设置断点进行调试?
答:一般情况下,release模式设置断点是不起作用的。但是,在进行了以下设置之后就可以和debug模式一样进行调试了。
第一,用鼠标右击当前的工程,然后点击c/c++,在右边会现在Debug Information Format一栏,建议里面改为"Program Database (/Zi)". 注意默认为"Disabled"。
第二,确保Linker->Debugging-->Generate Debug Info应该是"Yes(/DEBUG)".

有了以上两点就可以了。但是呢,这样编译出来的*.exe运行起来可能不是特别快。所以在完成代码之后呢,建议将以上两点恢复原来设置,使得达到release模式应用的效率。

本文来自CSDN博客,转载请标明出处:http://blog.csdn.net/csmqq/archive/2010/02/18/5311269.aspx

分享到:
评论

相关推荐

    计算几何扫描线算法sweep─line算法C++代码实现(CGAL实现的例子)

    基于计算几何算法库实现的Sweep-line算法,能够报告直线的交点(CGAL实现的例子)

    CGAL编程指南(c++版)

    cgal编程指南,使用c++编写,方便快捷,容易迁移,很好的库文件,欢迎使用。

    CGAL的vs2017库

    CGAL的vs2017库

    CGAL图形编程库

    Cgal编程函数库,方便图形学编程,能够为您提供方便的程序调用

    c++ programming with cgal.rar

    强大的几何库的C++使用说明。详细的介绍了CGAL的使用方法。

    CGAL模型凸包计算-C++代码+详细说明文档

    CGAL模型凸包计算,利用CGAL计算几何算法库,解决了模型凸包运算问题。资源包含完整代码和详细说明文档。

    CGAL多面体布尔运算-C++代码+详细说明文档

    CGAL多面体布尔运算,利用CGAL计算几何算法库,解决了多面体模型的布尔运算问题(多面体的并、交、差的实现)。资源包含完整代码和详细说明文档。

    cgal 计算几何 库

    cagl,计算几何 库,包括 常用得计算几何算法.

    CGAL 计算几何算法库

    CGAL 计算几何算法库安装文件 徐如demo样式,请留言邮箱,看到了发

    CGAL库的文档 说明

    CGAL ,计算几何算法库,是一个大型C + +库的几何数据结构和算法,如Delaunay三角网,网格生成,布尔运算的多边形,以及各种几何处理算法。 CGAL是用来在各个领域:计算机图形学,科学可视化,计算机辅助设计与建模...

    CGAL计算几何算法库-概述

    CGAL的中文概述,主要翻译了关于英文CGAL-overview中的主要内容。

    CGAL计算几何库 5.5.2版本

    CGAL计算几何库 5.5.2版本,rar压缩包中包含: cgal-5.5.2.zip CGAL-5.5.2-doc_html.zip CGAL-5.5.2-examples.zip CGAL-5.5.2-library.zip CGAL-5.5.2-win64-auxiliary-libraries-gmp-mpfr.zip

    CGAL-5.2-win64-auxiliary-libraries-gmp-mpfr--CGAL计算几何算法库.zip

    CGAL或计算几何算法库是一个C ++库,可让您轻松访问各种高效而可靠的几何算法。这些算法可用于广泛的应用程序,包括计算机辅助设计,机器人技术,分子生物学,医学成像,地理信息系统等。 CGAL具有广泛的数据结构和...

    计算几何库,计算机图形学CGAL库

    计算几何,计算机图形学,网格处理

    cgal-releases-CGAL-5.0.zip

    Using CGAL on Windows (with Visual C++) https://doc.cgal.org/latest/Manual/windows.html Essential and Optional Third Party Dependencies gives information (supported versions, download links) of the ...

    CGAL参考手册(CGAL_4.7 Hello World)

    学习CGAL之前,需要对C++语言、几何算法有基本的了解。第一小节将会向读者展示如何定义点和直线,以及如何把几何谓词作用在这些元素上。之后,本小节还将进一步说明使用浮点数表示坐标会引起一系列问题。在第二小节...

    CGAL5.4.0库 + gmp库

    CGAL库,全部模板化,只需要包含头文件就可以使用的C++库。附带了第三方库gmp。

    基于UE4的cgal布尔运算过程文件.rar

    基于UE4的cgal布尔运算过程文件基于UE4的cgal布尔运算过程文件基于UE4的cgal布尔运算过程文件基于UE4的cgal布尔运算过程文件基于UE4的cgal布尔运算过程文件

    cgal-releases-CGAL-5.0.tar.gz

    CGAL,Computational Geometry Algorithms Library,计算几何算法库,设计目标是,以C++库的形式,提供方便,高效,可靠的几何算法。CGAL可用于各种需要几何计算的领域,如计算机图形学,科学可视化,计算机辅助设计...

    CGAL4.8.1安装包

    CGAL是Computational Geometry Algorithms Library(计算几何算法库)的缩写,用C++语言提供高效、可靠的算法库。

Global site tag (gtag.js) - Google Analytics