See someone in the QQ space sigh compile cgal configuration toss a day, oneself also want to try, although not intended to use, but feel this library is also quite famous, presumably later need, so start trying to compile.
The first is to look at the official website under the Windows configuration instructions
Http://www.cgal.org/download/windows.html
Learn about the third-party libraries that are needed
BOOST_1_59_0 (need to use binary precompiled version, do not have to toss over the boost, great)
Qt msvc2013-5.5.1
Libqglviewer
And then we need cmake, and I believe most of the third-party libraries have been used.
CMake
And then certainly the Cgal library, which uses Cgal-4.7-setup.exe installation, rather than compiling it yourself, is good news for me.
CGAL4.7 Download
=====================================================================================================
So the preparation work is done, the following start configuration, note that although I am using a 64-bit system, but I only compile 32-bit library, because just want to try to compile this library, do not intend to use too much,
If you want to compile 64 bits should be similar, just download the corresponding 64-bit version, to the corresponding directory on the line, such as the use of UNREAL4
First installs the Boost precompiled version, I use the Boost_1_59_0-msvc-12.0-32.exe
I put it in.
D:\CPPLibs\boost\boost_1_59_0
Then create a new environment variable Boost_librarydir and Boost_includedir, set to
boost_librarydir=d:\cpplibs\boost\boost_1_59_0\lib32-msvc-12.0
Boost_includedir=d:\cpplibs\boost\boost_1_59_0
Modify to your own directory
Then put the boost root directory
D:\CPPLibs\boost\boost_1_59_0
Add to Path directory
Then install QT5.5.1
I put it on D-plate.
D:\Qt\Qt5.5.1
New environment variable Qtdir
Add your QT5.5.1 root directory.
Then add the bin directory to the path directory, note that the bin directory of Qt is best placed in the PATH environment variables, the official said can prevent conflict or something
D:\Qt\Qt5.5.1\5.5\msvc2013\bin
And then the Libqglviewer.
I put it in.
D:\CPPLibs\libQGLViewer-2.6.3
Open your command prompt
It's officially said
Start the x86 Visual Studio Command Prompt
But I didn't find it, so I used it myself by opening a command prompt and then finding
D:\Program Files (x86) \microsoft Visual Studio 12.0\vc\bin\vcvars32.bat
Drag into the command prompt to run once, configure the environment variables, note that this is a 32-bit version, if you use 64 bit as if there is a vcvars64.bat
Then the command prompt enters the following directory
D:\CPPLibs\libQGLViewer-2.6.3\QGLViewer
Then run separately
Qmake
Nmake
If there is no error on the compilation is correct, I did not run the environment variables, so there will be RC what hint can not find windows.h, and the environment variables should be able to find
If you are prompted RC what is not a command, I do not know if I did not run the vcvars32 before the problem, the hint can not be found, then you find the Rc.exe directory, add to the environment variable on the line.
Generally not in the VS installation directory, that is, in the system disk sdk8.0 or 8.1 directory, in short if you can not find Rc.exe hint add to the environment variable on the line
Compile no problem after the
D:\CPPLibs\libQGLViewer-2.6.3\QGLViewer\release;
D:\CPPLibs\libQGLViewer-2.6.3\QGLViewer\debug;
Add to PATH environment variable
Then create a new environment variable Qglviewerroot
With the Qglviewer root directory location
D:\CPPLibs\libQGLViewer-2.6.3
==================================================================================================
The above configuration work is basically completed. You can start compiling cgal.
Run Cgal-4.7-setup.exe, pay attention to the need for networking, because you want to download files
I put it in.
D:\CPPLibs\CGAL-4.7
Open the CMake GUI and put
D:\CPPLibs\CGAL-4.7\CMakeLists.txt
Just drag it onto the CMake GUI.
Note that you should empty the source and binaries text boxes when dragging, otherwise you can't drag them up.
Then put
Where to build the binraries path at the end of the add build, he will ask the directory does not exist whether to create, OK on the line.
After the point configure, after a while to find the corresponding library, prompting no problem after point generate, if everything is correct will be generated
CGAL.sln
Open Project file
Right-click on the solution and select batch Build
Check Debug and release on all build.
Dot build on the line, all right words Cgal compiled
==================================================================================================
Next Compile example
Be careful not to take for granted the cmake of all the projects in the example directory, the generated sln will contain a pile of works, and if the visual assist is installed, the project will die badly. Parsing a long time.
As the authorities say, just test the corresponding
Open the CMake GUI, empty it, and then put
D:\CPPLibs\CGAL-4.7\examples\Convex_hull_2\CMakeLists.txt
Drag up, configure, build, just fine.
Build the SLN project after compiling the run, if prompted
Lack of boost or
Lost Libgmp-10.dll
You need to add the boost DLL and Libgmp-10.dll path to the PATH environment variable
You may need to set the environment variable directory name of the calling DLL
D:\Qt\Qt5.5.1\5.5\msvc2013\bin;
D:\CPPLibs\CGAL-4.7\build\bin;
D:\CPPLibs\CGAL-4.7\auxiliary\gmp\lib
D:\CPPLibs\boost\boost_1_59_0\lib32-msvc-12.0;
D:\CPPLibs\libQGLViewer-2.6.3\QGLViewer
If everything is right, put
Ch_timing is set up as a project startup item and runs, showing this
This proves that example is functioning properly.
==================================================================================================
The final is to compile the demo project, ibid, open cmake GUI, empty
D:\CPPLibs\CGAL-4.7\demo\Triangulation_3\CMakeLists.txt
Drag up, configure, generate SLN, compile run
Win7 64-bit VS2013 environment compilation CGAL-4.7