我在我的 Mac OS X (10.8.4) 上安装了 CGAL。我已经成功地将 CGAL 的各个方面整合到以前的 C++ 程序中,以计算 3D 点云的凸包。但是,现在我正在尝试包含 CGAL 的其他部分来计算表面网格,将它们转换为多面体等等。当我这样做时,程序编译得很好,但随后我收到了我不理解的链接错误。
这是我编译后的链接命令:
c++ -O2 -I/usr/local/include -I/usr/include -I/opt/local/include -o /Users/bullard/ShapeMetrology/Particle/bin/diffgeom diffgeom.a -L/usr/local/lib -L/usr/lib -L/opt/local/lib -lboost_math_c99 -lm -lCGAL -lCGAL_Core -lCGAL_ImageIO -lgmp
这是我收到的(相当冗长的)链接错误:
架构 x86_64 的未定义符号:“boost::detail::get_tss_data(void const*)”,引用自:CGAL::Lazy, CGAL::Gmpq, CGAL::Lazy_exact_nt, CGAL::To_interval >::zero() in diffgeom.a(Particle.o) boost::thread_specific_ptr, CGAL::Gmpq, CGAL::Lazy_exact_nt, CGAL::To_interval > >::reset(CGAL::Lazy, CGAL::Gmpq, CGAL::Lazy_exact_nt, CGAL: :To_interval >*) in diffgeom.a(Particle.o) CGAL::Lazy > >, CGAL::Point_3 >, CGAL::Gmpq, CGAL::Cartesian_converter, CGAL::Simple_cartesian >, CGAL::NT_converter > > ::zero() in diffgeom.a(Particle.o) boost::thread_specific_ptr > >, CGAL::Point_3 >, CGAL::Gmpq, CGAL::Cartesian_converter, CGAL::Simple_cartesian >, CGAL::NT_converter > > > >::reset(CGAL::Lazy > >, CGAL::Point_3 >, CGAL::Gmpq, CGAL::Cartesian_converter, CGAL::Simple_cartesian >, CGAL::NT_converter > > *) in diffgeom.a(Particle.o) CGAL::Lazy > >, CGAL::Sphere_3 >, CGAL::Gmpq, CGAL::Cartesian_converter, CGAL ::Simple_cartesian >, CGAL::NT_converter > > >::zero() in diffgeom.a(Particle.o) boost::thread_specific_ptr > >, CGAL::Sphere_3 >, CGAL::Gmpq, CGAL::Cartesian_converter, CGAL ::Simple_cartesian >, CGAL::NT_converter > > > >::reset(CGAL::Lazy > >, CGAL::Sphere_3 >, CGAL::Gmpq, CGAL::Cartesian_converter, CGAL::Simple_cartesian >, CGAL::NT_converter > > >*) in diffgeom.a(Particle.o) "boost::detail::set_tss_data(void const*, boost::shared_ptr, void*, bool)",引用自:boost::thread_specific_ptr, CGAL:: Gmpq, CGAL::Lazy_exact_nt, CGAL::To_interval > >::diffgeom.a(Particle.o) 中的重置(CGAL::Lazy, CGAL::Gmpq, CGAL::Lazy_exact_nt, CGAL::To_interval >*) boost::thread_specific_ptr, CGAL::Gmpq, CGAL::Lazy_exact_nt, CGAL: :To_interval > >::~thread_specific_ptr() in diffgeom.a(Particle.o) boost::thread_specific_ptr > >, CGAL::Point_3 >, CGAL::Gmpq, CGAL::Cartesian_converter, CGAL::Simple_cartesian >, CGAL: :NT_converter > > > >::reset(CGAL::Lazy > >, CGAL::Point_3 >, CGAL::Gmpq, CGAL::Cartesian_converter, CGAL::Simple_cartesian >, CGAL::NT_converter > > >*) .a(Particle.o) boost::thread_specific_ptr > >, CGAL::Point_3 >, CGAL::Gmpq, CGAL::Cartesian_converter, CGAL::Simple_cartesian >, CGAL::NT_converter > > >::~thread_specific_ptr()在 diffgeom.a(Particle.o) 中提升::thread_specific_ptr > >, CGAL::Sphere_3 >, CGAL::Gmpq, CGAL::Cartesian_converter, CGAL::Simple_cartesian >, CGAL::NT_converter > > > >::reset(CGAL::Lazy > >, CGAL::Sphere_3 > , CGAL::Gmpq, CGAL::Cartesian_converter, CGAL::Simple_cartesian >, CGAL::NT_converter > > >*) in diffgeom.a(Particle.o) boost::thread_specific_ptr > >, CGAL::Sphere_3 >, CGAL: :Gmpq, CGAL::Cartesian_converter, CGAL::Simple_cartesian >, CGAL::NT_converter > > > >::~thread_specific_ptr() in diffgeom.a(Particle.o) "_mpfr_clear",引用自:CGAL::cpp11:: result_of > >, CGAL::CartesianKernelFunctors::Compute_squared_radius_3 > > (CGAL::Sphere_3)>::type CGAL::Lazy_construction_nt > >, CGAL::CartesianKernelFunctors::Compute_squared_radius_3 >::operator() >(CGAL::Sphere_3 const&) const in diffgeom.a(Particle.o) CGAL::Cartesian_converter, CGAL::Simple_cartesian >, CGAL::NT_converter > >::operator()(CGAL::Point_3 > const& ) diffgeom.a(Particle.o) 中的常量 CGAL::Cartesian_converter, CGAL::Simple_cartesian >, CGAL::NT_converter >::operator()(CGAL::Sphere_3 > const&) diffgeom.a(Particle.o) 中的常量) CGAL::Lazy_rep_1, CGAL::Gmpq, CGAL::CartesianKernelFunctors::Compute_squared_radius_3 > >, CGAL::CartesianKernelFunctors::Compute_squared_radius_3 >, CGAL::To_interval, CGAL::Sphere_3 >::update_exact() diffgeom.a 中的常量(Particle.o) CGAL::cpp11::result_of > >, CGAL::CartesianKernelFunctors::Compute_z_3 > > (CGAL::Point_3)>::type CGAL::Lazy_construction_nt > >, CGAL::CartesianKernelFunctors::Compute_z_3 > >::operator() >(CGAL::Point_3 const&) const in diffgeom.a(Particle.o) CGAL::Lazy_rep_1, CGAL::Gmpq, CGAL::CartesianKernelFunctors::Compute_z_3 > >, CGAL::CartesianKernelFunctors ::Compute_z_3 >, CGAL::To_interval, CGAL::Point_3 >::update_exact() const in diffgeom.a(Particle.o) CGAL::cpp11::result_of > >, CGAL::CartesianKernelFunctors::Compute_y_3 > > ( CGAL::Point_3)>::type CGAL::Lazy_construction_nt > >, CGAL::CartesianKernelFunctors::Compute_y_3 > >::operator() >(CGAL::Point_3 const&) const in diffgeom.a(Particle.o) .. . "_mpfr_get_d",引用自:CGAL::cpp11::result_of >>, CGAL::CartesianKernelFunctors::Compute_squared_radius_3 >> (CGAL::Sphere_3)>::type CGAL::Lazy_construction_nt >>, CGAL::CartesianKernelFunctors::Compute_squared_radius_3 > >::operator() >(CGAL::Sphere_3 const&) diffgeom.a(Particle.o) 中的 CGAL::Cartesian_converter, CGAL::Simple_cartesian >, CGAL::NT_converter > >::operator( )(CGAL::Point_3 > const&) const in diffgeom.a(Particle.o) CGAL::Cartesian_converter, CGAL::Simple_cartesian >, CGAL::NT_converter >::operator()(CGAL::Sphere_3 > const&) const在 diffgeom.a(Particle.o) CGAL::Lazy_rep_1, CGAL::Gmpq, CGAL::CartesianKernelFunctors::Compute_squared_radius_3 > >, CGAL::CartesianKernelFunctors::Compute_squared_radius_3 >, CGAL::To_interval, CGAL::Sphere_3 >:: update_exact() const in diffgeom.a(Particle.o) CGAL::cpp11::result_of > >, CGAL::CartesianKernelFunctors::Compute_z_3 > > (CGAL::Point_3)>::type CGAL::Lazy_construction_nt > >, CGAL::CartesianKernelFunctors::Compute_z_3 > >::operator() >(CGAL::Point_3 const&) diffgeom.a(Particle.o) 中的常量 CGAL::Lazy_rep_1, CGAL::Gmpq, CGAL::CartesianKernelFunctors ::Compute_z_3 > >, CGAL::CartesianKernelFunctors::Compute_z_3 >, CGAL::To_interval, CGAL::Point_3 >::update_exact() const in diffgeom.a(Particle.o) CGAL::cpp11::result_of >, CGAL::CartesianKernelFunctors::Compute_y_3 > > (CGAL::Point_3)>::type CGAL::Lazy_construction_nt > >, CGAL::CartesianKernelFunctors::Compute_y_3 > >::operator() >(CGAL::Point_3 const&) const in diffgeom.a(Particle.o) ... "_mpfr_init2",引用自:CGAL::cpp11::result_of > >, CGAL::CartesianKernelFunctors::Compute_squared_radius_3 > > (CGAL::Sphere_3)>::type CGAL::Lazy_construction_nt > >, CGAL::CartesianKernelFunctors::Compute_squared_radius_3 > >::operator() >(CGAL::Sphere_3 const&) const in diffgeom.a(Particle.o) CGAL::Cartesian_converter, CGAL:: Simple_cartesian >, CGAL::NT_converter > >::operator()(CGAL::Point_3 > const&) const in diffgeom.a(Particle.o) CGAL::Cartesian_converter, CGAL::Simple_cartesian >, CGAL::NT_converter > >: :operator()(CGAL::Sphere_3 > const&) const in diffgeom.a(Particle.o) CGAL::Lazy_rep_1, CGAL::Gmpq, CGAL::CartesianKernelFunctors::Compute_squared_radius_3 > >, CGAL::CartesianKernelFunctors::Compute_squared_radius_3 > , CGAL::To_interval, CGAL::Sphere_3 >::update_exact() const in diffgeom.a(Particle.o) CGAL::cpp11::result_of > >, CGAL::CartesianKernelFunctors::Compute_z_3 > > (CGAL::Point_3)>::type CGAL::Lazy_construction_nt > >, CGAL::CartesianKernelFunctors::Compute_z_3 > >::operator() >(CGAL::Point_3 const&) diffgeom.a(Particle. o) CGAL::Lazy_rep_1, CGAL::Gmpq, CGAL::CartesianKernelFunctors::Compute_z_3 > >, CGAL::CartesianKernelFunctors::Compute_z_3 >, CGAL::To_interval, CGAL::Point_3 >::update_exact() diffgeom 中的常量。 a(Particle.o) CGAL::cpp11::result_of > >, CGAL::CartesianKernelFunctors::Compute_y_3 > > (CGAL::Point_3)>::type CGAL::Lazy_construction_nt > >, CGAL::CartesianKernelFunctors::Compute_y_3 > >::operator() >(CGAL::Point_3 const&) const in diffgeom.a(Particle.o) ... "_mpfr_set_q",引用自:CGAL::cpp11::result_of >>, CGAL::CartesianKernelFunctors::Compute_squared_radius_3 > > (CGAL::Sphere_3)>::type CGAL::Lazy_construction_nt > >, CGAL::CartesianKernelFunctors::Compute_squared_radius_3 > >::operator() >(CGAL::Sphere_3 const&) diffgeom.a(Particle. o) CGAL::Cartesian_converter, CGAL::Simple_cartesian >, CGAL::NT_converter >::operator()(CGAL::Point_3 > const&) const in diffgeom.a(Particle.o) CGAL::Cartesian_converter, CGAL:: Simple_cartesian >, CGAL::NT_converter > >::operator()(CGAL::Sphere_3 > const&) const in diffgeom.a(Particle.o) CGAL::Lazy_rep_1, CGAL::Gmpq, CGAL::CartesianKernelFunctors::Compute_squared_radius_3 > >, CGAL::CartesianKernelFunctors::Compute_squared_radius_3 >, CGAL::To_interval, CGAL::Sphere_3 >::update_exact() diffgeom.a(Particle.o) CGAL::cpp11:: 中的常量result_of > >, CGAL::CartesianKernelFunctors::Compute_z_3 > > (CGAL::Point_3)>::type CGAL::Lazy_construction_nt > >, CGAL::CartesianKernelFunctors::Compute_z_3 > >::operator() >(CGAL::Point_3 const&) const in diffgeom.a(Particle.o) CGAL::Lazy_rep_1, CGAL::Gmpq, CGAL::CartesianKernelFunctors::Compute_z_3 > >, CGAL::CartesianKernelFunctors::Compute_z_3 >, CGAL::To_interval, CGAL::Point_3 >::update_exact() const in diffgeom.a(Particle.o) CGAL::cpp11::result_of > >, CGAL::CartesianKernelFunctors::Compute_y_3 > > (CGAL::Point_3)>::type CGAL::Lazy_construction_nt > >, CGAL::CartesianKernelFunctors::Compute_y_3 > >::operator() >(CGAL::Point_3 const&) diffgeom.a(Particle.o) 中的 const ... ld: 未找到架构 x86_64 的符号 clang:错误:链接器命令失败,退出代码为 1(使用 -v 查看调用)make:* [/Users/bullard/ShapeMetrology/Particle/bin/diffgeom] 错误 1
我是否在链接命令中缺少 CGAL 库?同样,当我使用 CGAL 来计算凸包时,我没有遇到任何问题,但是现在我试图包含曲面网格,这个问题似乎已经出现。
如果有帮助,我很乐意发布代码的相关部分,但此时我不知道哪些部分是相关的。