Supported Platforms



The following platforms are supported as of Release 3.3:

compiler operating system
GNU g++  3.3 - 4.2 Linux 2.x / MacOS X 10.3+ / Solaris 2.6+
MS Windows 95/98/2000/XP/NT4 (with Cygwin)
MS Visual C++  7.1 (.NET 2003), 8.0 (.NET 2005) MS Windows 95/98/2000/XP/NT4
Intel C++ 9.0 MS Windows 95/98/2000/XP/NT4

If your platform/compiler is not on this list, this does not necessarily imply that CGAL does not work on your system. Note: 64-bit variants of these platforms are also supported. The Installation Guide that will guide you through the installation process is part of the distribution.

Visual C++ related issues

Supported Versions

We support Visual C++ .net 2003 (VC7.1), and Visual C++ .net 2005 (VC8). We no longer support Visual C++ 6 and and Visual C++ .net. (VC7.0)

Choosing the Runtime Library

Do not mix static and dynamic versions of the run-time libraries (CRT), and make sure that all static and dynamic link libraries are built with the same version of the CRT. More than one copy of the run-time libraries in a process can cause problems, because static data in one copy is not shared with the other copy. The linker prevents you from linking with both static and dynamic versions within one .exe file, but you can still end up with two (or more) copies of the run-time libraries. For example, a dynamic-link library linked with the static (non-DLL) versions of the run-time libraries can cause problems when used with an .exe file that was linked with the dynamic (DLL) version of the run-time libraries. (You should also avoid mixing the debug and non-debug versions of the libraries in one process because the debug version might have different definition of objects, as is the case of the STL containers and iterators in VC8.)

In the IDE, go to Project-> ... properties->C/C++->Code Generation and select in "Runtime Library".

Automatic Library Selection

To prevent mixing different run-time libraries, starting from CGAL version 3.3, boost-style automatic library selection (auto-linking) is used for CGAL, CGALQt, CGALcore and the third-party libraries installed via the windows installer (GMP, MPFR and TAUCS). This feature allows you to choose any build configuration for your application without worrying to have a matching precompiled .lib to link against.

Auto-linking works by encoding the compiler+configuration in the library filename and using #pragma to link the file automatically.

The windows installer for CGAL version 3.3 allows you to install variants of the CGAL libraries precompiled with both VC7.1 and VC8.0. It also allows you to install MPFR, GMP and TAUCS precompiled as variants too.

Third Party Libraries

Boost

CGAL depends on Boost, that is before installing CGAL you must install Boost. There is no need to compile Boost, so downloading the zip file and extracting the header is enough. Alternatively you can download a Windows Installer for the current Boost release, provided by Boost Consulting.

The project files for CGAL use the environment variable $(BOOSTROOT) to locate the boost libraries in your system. If you don't set the variable yourself, the windows installer for CGAL will search for boost and set the variable appropriately (with your permission).

GMP and MPFR

GMP and MPFR are two number type libraries which are optional, but they might be useful for you when you experience robustness problems with floating point numbers. Starting from CGAL version 3.2, gmp-mpfr is included in the CGAL installer. Starting from CGAL version 3.3, the CGAL installer allows you to install precompiled versions of these libraries (matching all configurations to enable auto-linking).

Setting Paths for Include and Library Files for Third Party Libraries

The project files for CGAL use the environment variable $(CGALROOT) to locate the CGAL libraries in your system. The windows CGAL installer (for version 3.3) sets this variable for your (unless you say no).

The third-party libraries that are installed via the CGAL installer: GMP, MPFR and TAUCS, are stored in "$(CGALROOT)/auxiliary/LIB", where LIB is "GMP" or "TAUCS"

As a Windows user you have three options to tell the compiler where to find header files and libraries.

The first option is to change it globally. When you use makefiles, the natural way to do it is to add them to the environment variables INCLUDE and LIBS.

When you use Developer Studio, the natural way to do it is to add them to the tool. In the IDE go to Tools->Options->Projects->VC++ Directories and in Show Directories for choose Include Files and Library Files.

Finally, you can do it for individual projects. In the IDE, go to Project->.. properties->C/C++->General and add the following paths to "Additional Include Directories":

"$(CGALROOT)\include\CGAL\config\msvc"
"$(CGALROOT)\include"
"$(CGALROOT)\auxiliary\gmp\include"
"$(CGALROOT)\auxiliary\TAUCS\include"

and go to Project->.. properties->Linker->General and add the following paths to "Additional Library Directories":

"$(CGALROOT)\lib\msvc"
"$(CGALROOT)\auxiliary\gmp\lib"
"$(CGALROOT)\auxiliary\TAUCS\lib"

Note that you can use environment variables (like CGALROOT) in paths, which allows easily to switch between different versions of a software.

Run-Time Type Information

You must enable run-time type information. In the IDE, go to Project-> ... properties->C/C++->Language. In makefiles add the /GR compiler option.

MFC

There are no specific problems using MFC and CGAL version.

Upgrading vcproj Files

CGAL provides .Net 2005 project files for building the library itself but not for examples and demos (for the library itself this is necessary because the filename of the generated .lib is now mangled with the compiler name per auto-linking requirements). For examples and demos, we provide only project files for VC++ .Net 2003. Those files can be easily converted to VC++ .net 2005: just open a project file within the VS .Net 2005 IDE and follow the conversion wizard. They have been designed to work with VC++ .net 2005 right after conversion. The other way around is not possible.

QT

Currently the CGAL demos work with Qt 3 and not with Qt 4.

VC 8 STL

Visual 8 now comes with the Dinkumware STL implementation which has a bug in std::operator(istream&, int) related to locales. When you read int's separated by commas it produces a bug. The workaround is to add whitespace between the number and the comma, or to set the locale correctly by calling std::locale::global(std::locale("C")); in the main routine.


Last modified on 02 June 07. info at cgal dot org