Skip to Content.
Sympa Menu

cgal-discuss - [cgal-discuss] CGAL compiling error undefined reference to `CGAL::assertion_fail

Subject: CGAL users discussion list

List archive

[cgal-discuss] CGAL compiling error undefined reference to `CGAL::assertion_fail


Chronological Thread 
  • From: runningterp <>
  • To:
  • Subject: [cgal-discuss] CGAL compiling error undefined reference to `CGAL::assertion_fail
  • Date: Mon, 10 Oct 2016 11:48:15 -0700 (PDT)
  • Authentication-results: mail2-smtp-roc.national.inria.fr; spf=None ; spf=SoftFail ; spf=None
  • Ironport-phdr: 9a23:69SchRF16UL24ZZYFzyYn51GYnF86YWxBRYc798ds5kLTJ76rs6wAkXT6L1XgUPTWs2DsrQf2rCQ6PCrADZdqdbZ6TZZL8wKD0dEwewt3CUeQ+e9QXXhK/DrayFoVO9jb3RCu0+BDE5OBczlbEfTqHDhpRQbGxH4KBYnbr+tQt2aue3sibH3osWbI14Q3HvuKY91eR65pAGUusgNipZ5MY4wzAHIqz1GYbd432RtcEiOmRD94Mis8YR7u3BUuu0s8cRHF676eYw3SLVZCHItNGVjt56jjgXKUQbavyhUaW4RiBcdWFCd4Q==

I just started to learn CGAL. After downloading CGAL-4.9 into my Ubuntu14.04
on Virtualbox, I installed it following the
http://doc.cgal.org/latest/Manual/installation.html, then I wrote a.cpp with
nothing but only include <CGAL/convex_hull_2.h> . I then used the following
command to compile it:

g++ -frounding-math -lCGAL -lCGAL_Core a.cpp

but I got the following error message:

/tmp/ccbCdUjo.o: In function
`CGAL::Interval_nt<false>::Test_runtime_rounding_modes::Test_runtime_rounding_modes()':
a.cpp:(.text._ZN4CGAL11Interval_ntILb0EE27Test_runtime_rounding_modesC2Ev[_ZN4CGAL11Interval_ntILb0EE27Test_runtime_rounding_modesC5Ev]+0xb7):
undefined reference to `CGAL::assertion_fail(char const*, char const*, int,
char const*)'
a.cpp:(.text._ZN4CGAL11Interval_ntILb0EE27Test_runtime_rounding_modesC2Ev[_ZN4CGAL11Interval_ntILb0EE27Test_runtime_rounding_modesC5Ev]+0x161):
undefined reference to `CGAL::assertion_fail(char const*, char const*, int,
char const*)'
/tmp/ccbCdUjo.o: In function
`CGAL::Interval_nt<true>::Test_runtime_rounding_modes::Test_runtime_rounding_modes()':
a.cpp:(.text._ZN4CGAL11Interval_ntILb1EE27Test_runtime_rounding_modesC2Ev[_ZN4CGAL11Interval_ntILb1EE27Test_runtime_rounding_modesC5Ev]+0xb7):
undefined reference to `CGAL::assertion_fail(char const*, char const*, int,
char const*)'
a.cpp:(.text._ZN4CGAL11Interval_ntILb1EE27Test_runtime_rounding_modesC2Ev[_ZN4CGAL11Interval_ntILb1EE27Test_runtime_rounding_modesC5Ev]+0x161):
undefined reference to `CGAL::assertion_fail(char const*, char const*, int,
char const*)'
collect2: error: ld returned 1 exit status

It is weird since the error like CGAL::assertion_fail should result from
forgetting -lCGAL, but I did -lCGAL and I checked that my libCGAL.so is in
the directory /usr/local/lib/x86_64-linux-gnu . I also tried to specify the
path by using:

g++ -I /home/osboxes/CGAL-4.9/include -lCGAL -L /home/osboxes/CGAL-4.9/lib/
a.cpp

but this doesn't help neither. So I am totally lost, and I really hope
someone could help me to resolve this problem.
Thank you very much!



--
View this message in context:
http://cgal-discuss.949826.n4.nabble.com/CGAL-compiling-error-undefined-reference-to-CGAL-assertion-fail-tp4662323.html
Sent from the cgal-discuss mailing list archive at Nabble.com.



Archive powered by MHonArc 2.6.18.

Top of Page