Subject: CGAL users discussion list
List archive
- From: Thiago Milanetto Schlittler <>
- To:
- Subject: [cgal-discuss] Problems linking CGAL programs
- Date: Thu, 9 Jul 2015 16:03:24 +0200
Hello!
I just installed CGAL 4.6 here and I’m having some problems compiling one of the examples. There seems to be no problems during the cmake step:
schlittlt@service0:~/libs/CGAL-4.6/examples/Straight_skeleton_2> cmake -DCGAL_DIR=/home/schlittlt/libs/CGAL-4.6 .
-- Build type: Release
-- USING CXXFLAGS = ' -frounding-math -O3 -DNDEBUG'
-- USING EXEFLAGS = ' '
-- Targetting Unix Makefiles
-- Using /usr/bin/c++ compiler.
-- Requested component: Core
-- Requested component: MPFR
-- Requested component: GMP
-- Configuring done
-- Generating done
-- Build files have been written to: /home/schlittlt/libs/CGAL-4.6/examples/Straight_skeleton_2
-- Build type: Release
-- USING CXXFLAGS = ' -frounding-math -O3 -DNDEBUG'
-- USING EXEFLAGS = ' '
-- Targetting Unix Makefiles
-- Using /usr/bin/c++ compiler.
-- Requested component: Core
-- Requested component: MPFR
-- Requested component: GMP
-- Configuring done
-- Generating done
-- Build files have been written to: /home/schlittlt/libs/CGAL-4.6/examples/Straight_skeleton_2
but I can’t link the the executable. It seems like ld is not find any external libraries:
schlittlt@service0:~/libs/CGAL-4.6/examples/Straight_skeleton_2> make
[ 11%] Building CXX object CMakeFiles/Create_offset_polygons_2.dir/Create_offset_polygons_2.cpp.o
Linking CXX executable Create_offset_polygons_2
/usr/lib64/gcc/x86_64-suse-linux/4.3/../../../../x86_64-suse-linux/bin/ld: warning: libirng.so, needed by /opt/san/bibliotheques/boost/1.55.0/lib/libboost_thread.so, not found (try using -rpath or -rpath-link)
CMakeFiles/Create_offset_polygons_2.dir/Create_offset_polygons_2.cpp.o: In function `CGAL::Cartesian_converter<CGAL::Type_equality_wrapper<CGAL::Cartesian_base_no_ref_count<double, CGAL::Epick>, CGAL::Epick>, CGAL::Simple_cartesian<CGAL::Mpzf>, CGAL::NT_converter<double, CGAL::Mpzf> >::operator()(CGAL::Vector_2<CGAL::Epick> const&) const':
Create_offset_polygons_2.cpp:(.text._ZNK4CGAL19Cartesian_converterINS_21Type_equality_wrapperINS_27Cartesian_base_no_ref_countIdNS_5EpickEEES3_EENS_16Simple_cartesianINS_4MpzfEEENS_12NT_converterIdS7_EEEclERKNS_8Vector_2IS3_EE[CGAL::Cartesian_converter<CGAL::Type_equality_wrapper<CGAL::Cartesian_base_no_ref_count<double, CGAL::Epick>, CGAL::Epick>, CGAL::Simple_cartesian<CGAL::Mpzf>, CGAL::NT_converter<double, CGAL::Mpzf> >::operator()(CGAL::Vector_2<CGAL::Epick> const&) const]+0x3ed): undefined reference to `__gmpn_copyi'
Create_offset_polygons_2.cpp:(.text._ZNK4CGAL19Cartesian_converterINS_21Type_equality_wrapperINS_27Cartesian_base_no_ref_countIdNS_5EpickEEES3_EENS_16Simple_cartesianINS_4MpzfEEENS_12NT_converterIdS7_EEEclERKNS_8Vector_2IS3_EE[CGAL::Cartesian_converter<CGAL::Type_equality_wrapper<CGAL::Cartesian_base_no_ref_count<double, CGAL::Epick>, CGAL::Epick>, CGAL::Simple_cartesian<CGAL::Mpzf>, CGAL::NT_converter<double, CGAL::Mpzf> >::operator()(CGAL::Vector_2<CGAL::Epick> const&) const]+0x40d): undefined reference to `__gmpn_copyi'
CMakeFiles/Create_offset_polygons_2.dir/Create_offset_polygons_2.cpp.o: In function `CGAL::Cartesian_converter<CGAL::Type_equality_wrapper<CGAL::Cartesian_base_no_ref_count<double, CGAL::Epick>, CGAL::Epick>, CGAL::Simple_cartesian<CGAL::Mpzf>, CGAL::NT_converter<double, CGAL::Mpzf> >::operator()(CGAL::Point_2<CGAL::Epick> const&) const':
Create_offset_polygons_2.cpp:(.text._ZNK4CGAL19Cartesian_converterINS_21Type_equality_wrapperINS_27Cartesian_base_no_ref_countIdNS_5EpickEEES3_EENS_16Simple_cartesianINS_4MpzfEEENS_12NT_converterIdS7_EEEclERKNS_7Point_2IS3_EE[CGAL::Cartesian_converter<CGAL::Type_equality_wrapper<CGAL::Cartesian_base_no_ref_count<double, CGAL::Epick>, CGAL::Epick>, CGAL::Simple_cartesian<CGAL::Mpzf>, CGAL::NT_converter<double, CGAL::Mpzf> >::operator()(CGAL::Point_2<CGAL::Epick> const&) const]+0x3ed): undefined reference to `__gmpn_copyi'
Create_offset_polygons_2.cpp:(.text._ZNK4CGAL19Cartesian_converterINS_21Type_equality_wrapperINS_27Cartesian_base_no_ref_countIdNS_5EpickEEES3_EENS_16Simple_cartesianINS_4MpzfEEENS_12NT_converterIdS7_EEEclERKNS_7Point_2IS3_EE[CGAL::Cartesian_converter<CGAL::Type_equality_wrapper<CGAL::Cartesian_base_no_ref_count<double, CGAL::Epick>, CGAL::Epick>, CGAL::Simple_cartesian<CGAL::Mpzf>, CGAL::NT_converter<double, CGAL::Mpzf> >::operator()(CGAL::Point_2<CGAL::Epick> const&) const]+0x40d): undefined reference to `__gmpn_copyi'
CMakeFiles/Create_offset_polygons_2.dir/Create_offset_polygons_2.cpp.o: In function `CGAL::Mpzf::aors(CGAL::Mpzf const&, CGAL::Mpzf const&, int)':
Create_offset_polygons_2.cpp:(.text._ZN4CGAL4Mpzf4aorsERKS0_S2_i[CGAL::Mpzf::aors(CGAL::Mpzf const&, CGAL::Mpzf const&, int)]+0xfc): undefined reference to `__gmpn_copyi'
CMakeFiles/Create_offset_polygons_2.dir/Create_offset_polygons_2.cpp.o:Create_offset_polygons_2.cpp:(.text._ZN4CGAL4Mpzf4aorsERKS0_S2_i[CGAL::Mpzf::aors(CGAL::Mpzf const&, CGAL::Mpzf const&, int)]+0x1bb): more undefined references to `__gmpn_copyi' follow
collect2: ld returned 1 exit status
make[2]: *** [Create_offset_polygons_2] Error 1
make[1]: *** [CMakeFiles/Create_offset_polygons_2.dir/all] Error 2
make: *** [all] Error 2
What am I doing wrong here?
Thanks in advance,
Thiago Milanetto Schlittler
- [cgal-discuss] Problems linking CGAL programs, Thiago Milanetto Schlittler, 07/09/2015
Archive powered by MHonArc 2.6.18.