I have posted this question in stack overflow (https://stackoverflow.com/ questions/59851535/undefined-reference-cgalprecondition-fail), but I reproduce
it here as I think its the right place for CGAL questions:
I am trying to build a project with CMake in Debug mode. The project contains
several static libraries, a dynamic library and an executable. The executable
links against the dynamic library and the dynamic library links against
several external dynamic libraries and to the project static libraries. One of
the static libraries depends on CGAL.
Static A -> CGAL
Dynamic C -> Static A, Static B, Qt...
Executable -> Dynamic C
When compiling in Release mode, everything works fine, but when compiling in
Debug mode, I get
[100%] Linking CXX executable ../../bin/Executable
/usr/bin/ld: ../../lib/DynamicC.so: undefined reference to
`CGAL::precondition_fail(char const*, char const*, int, char const*)'
collect2: error: ld returned 1 exit status
I have checked the exported symbols for DynamicC with `nm -D DynamicC | grep
CGAL::precondition_fail` and it says its undefined