Subject: CGAL users discussion list
List archive
- From: "Damian Sheehy" <>
- To:
- Subject: Re: [cgal-discuss] how to use CGAL with VS2005?
- Date: Fri, 2 Mar 2007 08:52:50 -0500
- Domainkey-signature: a=rsa-sha1; c=nofws; d=gmail.com; s=beta; h=received:message-id:date:from:to:subject:in-reply-to:mime-version:content-type:references; b=OO+nf1UNbUrNg49x5SHarhdSvi8rKL9gjb5bEmRd+LTj0/bbRjvsl52xZXczIp89NOgXOw434H4Lc9Tipd/BnFncqXeAhPNjaTFJyMA37dHFV8XnA6vBwYFaCJrWMmixm/yI4F2OcKJxLuzEYHC6PXUWY6I8+YQbTYOTpMhX2Lo=
Keith Ealanta posted an answer to this question a couple of months ago.
Here it is again. . .
---------- Forwarded message ----------
From: Keith Ealanta <>
Date: Dec 9, 2006 2:14 AM
Subject: [cgal-discuss] HOWTO setup Visual Studio 2005 (v.8) to use CGAL
To:
Oh, bad form, replying to my own email.
Still, here is my first draft on how to get to the point of one of the
examples compiling.
Please feel free to correct any mistakes or omissions, and to post it on
as and where needed for other users.
------------------------------------------------------------------------
Setting up CGAL for Visual Studio 2005
Be warned: This is not written by an expert. It is merely a summary of
my experiences of getting to the point of getting one of the examples to
compile.
For reference I'm running on Windows XP pro on a Dell inspiron 8600 laptop.
My personal goal is to use CGAL to provide boolean operations on
polygons for an application I'm developing.
I'm developing in vb.net with CGAL being bound in through a C++ class
library. I make no claim that this is efficient. I'm doing it becaue I
like the ability to protype code under vb (particularly graphical
interfaces). In time I hope to convert the vb side to Qt based C++.
Anyway, onto the setup.
Firstly we need to install CGAL. This is mostly straight forward.
Don't worry about the warnings about being unable to find the msvc7
config file. We'll perform these changes manually.
Reboot your computer to pickup the value for $(CGALROOT)
I'm assuming you have installled Boost already. If not get it from
boost.org and install it.
Now, With CGAL and Boost installed, open Visual Studio 2005.
From the menu select Tools|Options to open the Visual Studio Options Dialog
In the dialog, select Projects and Solutions|VC++ Directories
Select to show directories for Include Files.
Add the following entries...
$(CGALROOT)\include\CGAL\config\msvc7
$(CGALROOT)\include
$(CGALROOT)\auxiliary\gmp\include
$(CGALROOT)\auxiliary\taucs\include
$(CGALROOT)\auxiliary\zlib\include
and also add this if boost isn't already in your include paths.
c:\Program Files\Libraries\boost_1_33_1
Now select to show directories for Library Files
and add these entries
$(CGALROOT)\lib
$(CGALROOT)\auxiliary\gmp\lib
$(CGALROOT)\auxiliary\taucs\lib
$(CGALROOT)\auxiliary\zlib\lib
Now we are ready to recompile the libraries
1. Create an new blank solution in the folder C:\Program
Files\Libraries\CGAL-3.2.1\src
(By the way, correct all the paths you see here match yours. I'm
installing all my libraries into a folder c:/Program Files/Libraries, so
they may well not be same as you use.)
2. Add to it two projects. CGAL and Core (As I said above, no Qt till
we can have Qt4)
C:\Program Files\Libraries\CGAL-3.2.1\src\CGAL\cgallib.vcproj
C:\Program Files\Libraries\CGAL-3.2.1\src\core\Core.vcproj
As you add these they will need to be updated to VS2005. All the
default settings worked for me.
3. Now time to set up the builds.
We are going to set up 2 different versions of each library, a debug and
a release version.
Firstly lets set the build targets.
Select cgalib
From project properties, select Librarian and change output file to
../../lib/msvc8_debug/CGAL.lib for Configuration = Debug and
../../lib/msvc8_release/CGAL.lib for Configuration = Release
While we're here, in Configuration = Debug goto "C/C++ | Code
Generation" and change Runtime Library to Multi-threaded Debug DLL (/MDd)
Now to "C/C++ | Preprocessor" Add
;_SECURE_SCL=0;_HAS_ITERATOR_DEBUGGING=0 to Preprocessor Definitions for
both Debug and Release
Close project properties and select core
From project properties, select Librarian and change output file to
../../lib/msvc8_debug/core++.lib for Configuration = Debug and
../../lib/msvc8_release/core++.lib for Configuration = Release
While we're here, in Configuration = Debug goto "C/C++ | Code
Generation" and change Runtime Library to Multi-threaded Debug DLL (/MDd)
Now to "C/C++ | Preprocessor" Add
;_SECURE_SCL=0;_HAS_ITERATOR_DEBUGGING=0 to Preprocessor Definitions for
both Debug and Release
Now unless I've missed something the libraries should be ready to build.
Select Build | Batch Build. Select all four projects and tell it to build.
Now we are finally ready to build one of the examples.
I'm going to go for Nef_2 (well I did ssay I was looking for boolean
operations)
Go to C:\Program Files\Libraries\CGAL-3.2.1\examples\Nef_2
Open simple_intersection.vcproj
It will convert it to 2005
Under project properties set the following...
change msvc7 in Linker|General|Additional Library Directories to
msvc8_debug for debug and msvc8_release for release
In "C/C++ | Preprocessor" Add ;_SECURE_SCL=0;_HAS_ITERATOR_DEBUGGING=0
to Preprocessor Definitions for both Debug and Release
Finally for Configuration = Debug goto "C/C++ | Code Generation" and
change Runtime Library to Multi-threaded Debug DLL (/MDd)
Now you are ready to build and test the app.
For me this worked correctly. If it doesn't for you, I suggest posting
to the mailing list with questions and modifying these instructions to
fill in any blanks.
Thanks to all the folks behind these libraries
Keith Ealanta
From: Keith Ealanta <>
Date: Dec 9, 2006 2:14 AM
Subject: [cgal-discuss] HOWTO setup Visual Studio 2005 (v.8) to use CGAL
To:
Oh, bad form, replying to my own email.
Still, here is my first draft on how to get to the point of one of the
examples compiling.
Please feel free to correct any mistakes or omissions, and to post it on
as and where needed for other users.
------------------------------------------------------------------------
Setting up CGAL for Visual Studio 2005
Be warned: This is not written by an expert. It is merely a summary of
my experiences of getting to the point of getting one of the examples to
compile.
For reference I'm running on Windows XP pro on a Dell inspiron 8600 laptop.
My personal goal is to use CGAL to provide boolean operations on
polygons for an application I'm developing.
I'm developing in vb.net with CGAL being bound in through a C++ class
library. I make no claim that this is efficient. I'm doing it becaue I
like the ability to protype code under vb (particularly graphical
interfaces). In time I hope to convert the vb side to Qt based C++.
Anyway, onto the setup.
Firstly we need to install CGAL. This is mostly straight forward.
Don't worry about the warnings about being unable to find the msvc7
config file. We'll perform these changes manually.
Reboot your computer to pickup the value for $(CGALROOT)
I'm assuming you have installled Boost already. If not get it from
boost.org and install it.
Now, With CGAL and Boost installed, open Visual Studio 2005.
From the menu select Tools|Options to open the Visual Studio Options Dialog
In the dialog, select Projects and Solutions|VC++ Directories
Select to show directories for Include Files.
Add the following entries...
$(CGALROOT)\include\CGAL\config\msvc7
$(CGALROOT)\include
$(CGALROOT)\auxiliary\gmp\include
$(CGALROOT)\auxiliary\taucs\include
$(CGALROOT)\auxiliary\zlib\include
and also add this if boost isn't already in your include paths.
c:\Program Files\Libraries\boost_1_33_1
Now select to show directories for Library Files
and add these entries
$(CGALROOT)\lib
$(CGALROOT)\auxiliary\gmp\lib
$(CGALROOT)\auxiliary\taucs\lib
$(CGALROOT)\auxiliary\zlib\lib
Now we are ready to recompile the libraries
1. Create an new blank solution in the folder C:\Program
Files\Libraries\CGAL-3.2.1\src
(By the way, correct all the paths you see here match yours. I'm
installing all my libraries into a folder c:/Program Files/Libraries, so
they may well not be same as you use.)
2. Add to it two projects. CGAL and Core (As I said above, no Qt till
we can have Qt4)
C:\Program Files\Libraries\CGAL-3.2.1\src\CGAL\cgallib.vcproj
C:\Program Files\Libraries\CGAL-3.2.1\src\core\Core.vcproj
As you add these they will need to be updated to VS2005. All the
default settings worked for me.
3. Now time to set up the builds.
We are going to set up 2 different versions of each library, a debug and
a release version.
Firstly lets set the build targets.
Select cgalib
From project properties, select Librarian and change output file to
../../lib/msvc8_debug/CGAL.lib for Configuration = Debug and
../../lib/msvc8_release/CGAL.lib for Configuration = Release
While we're here, in Configuration = Debug goto "C/C++ | Code
Generation" and change Runtime Library to Multi-threaded Debug DLL (/MDd)
Now to "C/C++ | Preprocessor" Add
;_SECURE_SCL=0;_HAS_ITERATOR_DEBUGGING=0 to Preprocessor Definitions for
both Debug and Release
Close project properties and select core
From project properties, select Librarian and change output file to
../../lib/msvc8_debug/core++.lib for Configuration = Debug and
../../lib/msvc8_release/core++.lib for Configuration = Release
While we're here, in Configuration = Debug goto "C/C++ | Code
Generation" and change Runtime Library to Multi-threaded Debug DLL (/MDd)
Now to "C/C++ | Preprocessor" Add
;_SECURE_SCL=0;_HAS_ITERATOR_DEBUGGING=0 to Preprocessor Definitions for
both Debug and Release
Now unless I've missed something the libraries should be ready to build.
Select Build | Batch Build. Select all four projects and tell it to build.
Now we are finally ready to build one of the examples.
I'm going to go for Nef_2 (well I did ssay I was looking for boolean
operations)
Go to C:\Program Files\Libraries\CGAL-3.2.1\examples\Nef_2
Open simple_intersection.vcproj
It will convert it to 2005
Under project properties set the following...
change msvc7 in Linker|General|Additional Library Directories to
msvc8_debug for debug and msvc8_release for release
In "C/C++ | Preprocessor" Add ;_SECURE_SCL=0;_HAS_ITERATOR_DEBUGGING=0
to Preprocessor Definitions for both Debug and Release
Finally for Configuration = Debug goto "C/C++ | Code Generation" and
change Runtime Library to Multi-threaded Debug DLL (/MDd)
Now you are ready to build and test the app.
For me this worked correctly. If it doesn't for you, I suggest posting
to the mailing list with questions and modifying these instructions to
fill in any blanks.
Thanks to all the folks behind these libraries
Keith Ealanta
On 3/1/07, yang cheng <> wrote:
thanks
- how to use CGAL with VS2005?, yang cheng, 03/02/2007
- Re: [cgal-discuss] how to use CGAL with VS2005?, Damian Sheehy, 03/02/2007
- Re: [cgal-discuss] how to use CGAL with VS2005?, yang cheng, 03/03/2007
- Re: [cgal-discuss] how to use CGAL with VS2005?, yang cheng, 03/03/2007
- Re: [cgal-discuss] how to use CGAL with VS2005?, Damian Sheehy, 03/02/2007
Archive powered by MHonArc 2.6.16.