Skip to Content.
Sympa Menu

cgal-discuss - [cgal-discuss] Undefined reference to CGAL::precondition_fail

Subject: CGAL users discussion list

List archive

[cgal-discuss] Undefined reference to CGAL::precondition_fail


Chronological Thread 
  • From: Juan José Casafranca <>
  • To: "" <>
  • Subject: [cgal-discuss] Undefined reference to CGAL::precondition_fail
  • Date: Wed, 22 Jan 2020 02:59:58 +0100
  • Authentication-results: mail3-smtp-sop.national.inria.fr; spf=None ; spf=Pass ; spf=None
  • Ironport-phdr: 9a23:s/7cPxG25adDoaCYNPl8ZJ1GYnF86YWxBRYc798ds5kLTJ7zrsuwAkXT6L1XgUPTWs2DsrQY0raQ6vGrAjZIoc7Y9ixbK9oUD15NoP5VtjRoONSCB0z/IayiRA0BN+MGamVY+WqmO1NeAsf0ag6aiHSz6TkPBke3blItdaz6FYHIksu4yf259YHNbAVUnjq9Zq55IAmroQnLucQanIRvJrwsxhbNrXdFdfpazn5sKV6Pghrw/Mi98INt/ihKp/4t68tMWrjmcqolSrBVEC4oOH0v6s3xshnDQwqP5n8CXWgTjxFFHQvL4gzkU5noqif1ufZz1yecPc3tULA7Qi+i4LtxSB/pkygIKTg0+3zKh8NqjaJbpBWhpwFjw4PRfYqYOuZycr/bcNgHQ2dKQ8RfWDFbAo6kb4UBEfABM/tWoYf+qFQAogexCBKwBO3y0DJEmmP60bEk3+knDArI3BYgH9ULsHnMqNv1Kb0dUeaox6fMyjXDdOlR0irj5YfSaRAuu/+MXahqfsrX1UYgDR7Og1KSqYznIzyazP8Ns22B4Op6Tu+vhGsnpBtwojir3Msjlo7JhocMx13C6C53zoE1JdiiR056Z96pCIBQtz2AOIRqQcMiRH9otzggyr0IvZ67eyYLxI47yB7YbvyKdZWD7BH7VOuJPzt0mHZodKi8ihuy60Ss1PPwWtSu3FtKsyZJitrBu3MX2xDO5MWLUOVx80ih1DqVygze6ONJLEYpnqTBMZEh2KQ/lp8LvETDACD2nEL2gbeTdko+++io7/3rY7v8ppOBLoN0hAHzPrk0lsywBuQ4NQcOX2yF9uimyLLj+kj5TK1Ljv0wjKbZrIjXKdoHqqO9GQNY0YYu5wyhAzu4zdgUh3kKIE9ddBKClYfpOlXOIP7iDfe4hlShiDVrx/LaMbL7GZXNK2LMkK36cLZy7k5T0gszzdRF651IDbEBJer/WlXtu9zAEh85Lwu0zv77B9VyzIweXXuDDbKYMKPJrVCI+/kvI/KXaY8OuDf9LuAl6OT0gX84n18dZ6ip0oENZHC2BPQ1a3meNDDnjd4FVGsLpQEjV/fCiVuYUDcVaWz4F/Y36Tg/TY6nFozeXZuFgbqb3S79EIcANVpLElSdLXC9dYePUuwJYTi6LcpokzhCXr+kGKE70hT7lhLzzfJFKfFVsgYRrpvtztFz7OSbwRMw/jVvCs2H+26IRmBw2GgPQmllj+hEvUVhxwLbguBDiPtCGIkLvqIbYkIBLZfZitdCJZX3UwPFcM2OTQ//ENqjCDA1CNk2xo1XOhovK5CZlhnGmhGSLfoNjbXSXc4796vd2z76IMMvky+bhplktEEvR450DUPjhqN78FKOVYvAkkHciLzzMKpBhWjC82CMyWfIt0ZdAlZ9

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
const*)
```

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?







Archive powered by MHonArc 2.6.18.

Top of Page