This has been a common problem on forums but solutions elude me. Windows 10 64 bit, CGAL 4.11, Cmake 3.9.2, Boost 1.65.1, Qt5 for MSVS 2017, libQGLViewer 2.7.0, Visual Studio 2017, CGAL built both as Debug and Release, myriad C++ include paths and Windows user path variables tried. Same thing that it can't open, not necessarily can't find, a main CGAL library file. The .lib file certainly exists. When I try to run a simple CGAL test program, I can't get past this error.
1 Answers
Indeed, I had to activate Windows 10 built-in Bash shell, in two easy-to-Google steps, then simply copy cgal_create_CMakeLists from the CGAL scripts directory to my Visual Studio project directory and get into Windows disks through the Bash "mnt" directory. When I just typed "cgal_create_CMakeLists" it spit out info on how to install the script via a command and then, after much churning, when I just typed "cgal_create_CMakeLists" it added a CMakeLists file and I merely had to point CMake-gui to the unfound Boost_DIR install directory to let Configure not list red errors. Then Visual Studio could open the .sln file that was created by CMake-gui, and it compiled. Right click assigning my program listing in the Solution Explorer pane to Set as StartUp Project let me hit the green debugger arrow and after a blank console window disappeared, CGAL wrote a nice ASCII tetrahedral out.Mesh file. Initially, the example file I used was copied from the CGEN reference site and pasted into a fresh Visual Studio Windows Console project, of a spherical boundary tetrahedral mesh:
http://cgal-discuss.949826.n4.nabble.com/CGAL-demos-on-Windows-won-t-configure-td4656618.html
I'm not sure what software will now visualize the simply formatted .Mesh file, since MeshLab won't.
Three Demo packages are said to create their own graphics if you have QT5 and libQGLViewer: Polygon, Polyhedron and AABB_tree. I can at least have some chance in building them with Visual Studio, now that CMake is partnered with CGEN's little shell script Windows 10 is happy to run.
CGAL is vastly complicated to use at all until you read the fine print about it being fundamentally reliant on a CMake preparation script for compiling even the simplest of examples.