1

Hey I'm a bit of a noob when it comes to CGAL and CMake but I've gotten to the point where everything seems to be running except for this link error:

LINK : fatal error LNK1104: cannot open file 'libCGAL-vc120-mt-sgd-4.5.1.lib'

trouble is I cant seem to find a reference to this lib anywhere am I building wrong?

I can see a 'libCGAL-vc120-mt-gd-4.5.1.lib' in my cgal lib dir which links fine. I'm not sure what the difference between gd and sgd is though and how to make it.

Any help is appreciated.

drescherjm
  • 10,365
  • 5
  • 44
  • 64
  • What OS is this? Linux? – Fantastic Mr Fox Jan 15 '15 at 18:07
  • ***I'm not sure what the difference between gd and sgd is though and how to make it.*** I believe the difference is sgd = static debug where gd = debug dll. Looks like it follows the boost naming. http://stackoverflow.com/questions/2715164/how-can-i-decode-the-boost-library-naming – drescherjm Jan 15 '15 at 18:08
  • This is visual studio 2013 by the error message and library naming. vc120 == Visual Studio 2013. – drescherjm Jan 15 '15 at 18:17
  • Windows 8.1 - Visual Studio 2013. Thought it might have to do with static linking I've tried forcing it to make with the static boost libraries but still doesn't generate an -sgd- version, only an -gd-, when i compile in vs. Is there some sort of flag that I'm not aware of that i need to add in either vs or c-make? – Aidan Possemiers Jan 16 '15 at 02:00
  • With CMake a lot of libraries use a BUILD_SHARED option (check in cmake-gui) to build shared libraries (dlls). I do not use cgal so I am not sure. – drescherjm Jan 16 '15 at 05:02

1 Answers1

1

The naming libCGAL-vc120-mt-sgd-4.5.1.lib shows that you are compiling a program, that uses CGAL, using the linker flag /MTd (Debug, and link the C++ runtime statically).

The CMake scripts of CGAL do not support linking with the static runtime. They only support /MD or /MDd. I suggest you change that linker flag in your setup.

Alternately, you can try to change the CMake scripts of CGAL, but I do not recommend that solution.

lrineau
  • 6,036
  • 3
  • 34
  • 47