Installing CGAL and related programs on Windows operating system
This page explains how to install CGAL 4.3 with Boost 1.55.0 and QT4.8.5 on Windows 8 using Visual Studio 2010 generating 32 bit binaries. The same procedure should apply to earlier versions of Windows.
Note that during the entire setup you need internet connection!
Note that the installation requires significant disk space. Make sure to free enough disk space before the installation.
Instructions on adding Environment Variables in Windows are at the end.
IMPORTANT: make sure that you install everything in 32-bit, even if your operating system is 64-bit.
- Visual Studio 2010 Professional (recommended) or Express.
Professional - Students can get a free version from https://www.dreamspark.com
- Boost 1.55.0: http://www.boost.org/doc/libs/1_55_0/more/getting_started/windows.html
- CMake 126.96.36.199: http://www.cmake.org/files/v2.8/cmake-188.8.131.52-win32-x86.exe
- CGAL 4.3.0 - https://gforge.inria.fr/frs/download.php/32993/CGAL-4.3-Setup.exe
- QT 4.8.5 - http://download.qt-project.org/official_releases/qt/4.8/4.8.5/qt-win-opensource-4.8.5-vs2010.exe
QT Visual Studio 2010 Professional addin - http://download.qt-project.org/official_releases/vsaddin/qt-vs-addin-1.1.11-opensource.exe
In parentheses are the paths on my computer.
- If you use the offline version, choose to install Visual C++.
- Accept the license terms.
- You may select a custom installation (instead of full) and select only Visual C++ (unselect other features).
- You don't need to install "SQL Server" & "Silverlight Runtime" although you may.
- There is a chance that it is recommended to reboot now.
- Open a command-line terminal, such as 'cmd'.
- Make the compiler known by running the following batch file:
c:\Program Files (x86)\Microsoft Visual Studio 10.0\VC\bin\vcvars32.bat
- Download the boost archive, unpack it to a target directory of your choice (e.g., C:\boost\boost_1_55_0), and change directory to target directory.
- Then, build the static, shared, single and multi threaded boost libraries:
.\b2 link=static,shared threading=single,multi variant=debug,release
- Make sure the subdirectory stage\lib\ has been populated with the compiled libraries (both .lib and .dll files).
- -Agree to the license.
- Check "Add CMake to the system PATH for all users".
- Check "create desktop icon".
- Next, Next, Next.
- Agree to the license.
- Next, Next, Next, Install.
- Add QTDIR variable with the value C:\Qt\4.8.5 to the environment variables (if it's not already there).
- Add <QT>\bin to the system PATH. (C:\Qt\4.8.5\bin)
- install the addin (works only in VS2010 Professional edition)
- CGAL installation will need to connect to the internet for GMP and MPFR.
- Be amazed by the splash screen.
- Agree to the license.
- Just choose the default: with GMP and MPFR, and with examples and demos.
- 32-bit (for me).
- In the "Setting Environment Variables" screen, choose all users and make sure that CGAL_DIR is checked.
- Add <CGAL_DIR >\auxiliary\gmp\lib to the system PATH. (C:\Program Files\CGAL-4.2-beta1\auxiliary\gmp\lib)
- Open CMake - cmake-gui (on the Desktop) - if you are using win7 make sure you open the program in administrator mode - right click on the icon and click on "run as administrator".
- For both "Where is the source code" and "Where to build the binaries" specify the CGAL Installation folder (C:\Program Files\CGAL-4.2-beta1)
- Click Configure.
- Choose "Visual Studio 10 2010" and click "Finish"
- Click Generate
- A solution named CGAL was created in the directory.
- Compile ALL_BUILD project both in Debug and Release (ignore the compilation error in CGAL_imageIO).
- All CGAL libraries should be under the lib directory.
- Open CMake (cmake-gui, can be found on the desktop) - (for win7 users, use "Run as admin")
- Choose "Where is the source code:" to be the Triangulation_2 demo directory under the CGAL installation. Namely, <CGAL>/demo/Triangulation_2 (C:\Program Files\CGAL-4.2-beta1/demo/Triangulation_2).
- Choose "Where to build the binaries:" to the same directory.
- Click Configure
- Click Generate
- Go to the directory (C:\Program Files\CGAL-4.2-beta1) and open the solution and compile. Run the Delaunay_triangulation project for check (in debug and release)
- Right-click on the selected project and select "Properties".
Setting up PATH variable or other Environment variables on windows systems
- From the desktop, right-click My Computer and click properties.
- (on Vista/Win7/Win8 click Advanced system settings on the left side)
- In the System Properties window, click on the Advanced tab.
- In the Advanced section, click the Environment Variables button.
- Finally, in the Environment Variables window, highlight the path variable in the Systems Variable section and click edit. Add or modify the path lines with the paths you wish the computer to access. Each different directory is separated with a semicolon as shown below.