Quantcast
Channel: Programming – Xinyustudio
Viewing all articles
Browse latest Browse all 284

Setup CGAL in Windows 7: step-by-step tutorial

$
0
0

CGAL (Computational Geometry Algorithms Library) is a useful library for CAD/CAE/CAM users and developers. Below is a step-by-step tutorial on how to install CGAL in your windows system.

  1. Download the CGAL source code here. In this example, I choose Windows platform and Visual C++ as the IDE. If you are a lazy bird, you might try below links directly.
  2. If you download the setup.exe and run it, it is easy to extract it via the wizard:

    image image
    image image
    image image
  3. Now the story just begins, we have to build CGAL from the source, either extracted as shown above using CGAL-4.0.2-Setup.exe or manually unpacked from CGAL-4.0.2.zip. To build the source for Visual Studio, we need cmake, a cross-platform, open-source build system.You can download CMAKE here or go directly with the direct link of windows version.
  4. Yup, you need install it! Skipped, coz trivial, Smile
  5. Now, open a cmd window and cd to the directory you have installed/extracted CGAL:

    image

    This activates the cmake-gui and takes the current directory “.” as the parameter.

  6. CMake is fired with the highlighted info automatically filled:

    image
  7. Press configure button above, the configuration window pops, select the generator as below, click finish.
    image
  8. It takes a while to configure CMAKE to build CGAL. But wait, you might find some errors pop up: in this case, it complains that Boost library is not found. It is recommended to download the setup installer for Boost 1.4.7, follow the setup wizard, you will be there!

    image
  9. Unpack this boost zip file, and click “Add Entry” and add a “BOOST_ROOT” option and point it to the boost installation folder:

    image

    image

  10. Re-click the configure button. Most likely, you will succeed. In rare cases, after installation of boost 1.4.7, reboot, and then repeat from step 5 on. Now, success!
  11. Press Generate button, and all the Visual Studio 2010 solution/project files are generate!

imageimage
Before                                                 After

Happy coding!


Filed under: Programming

Viewing all articles
Browse latest Browse all 284

Latest Images

Trending Articles



Latest Images