Undefined reference to CGAL::precondition_fail

classic Classic list List threaded Threaded
2 messages Options
Reply | Threaded
Open this post in threaded view

Undefined reference to CGAL::precondition_fail

Juan Jose Casafranca
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
Static B
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

nm -C DynamicC.so | grep CGAL::precondition
                 U CGAL::precondition_fail(char const*, char const*, int, char

I'm using a very recent CGAL header only version.
I dont understand why it's complaining about undefined reference in Debug mode
but not in Release, or how to fix it. Any ideas?

You are currently subscribed to cgal-discuss.
To unsubscribe or access the archives, go to

Reply | Threaded
Open this post in threaded view

Re: Undefined reference to CGAL::precondition_fail

Joachim Reichel-2
The author has deleted this message.