我在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 *)",引自: 在diffgeom.a(Particle.o)中CGAL :: Lazy,CGAL :: Gmpq,CGAL :: Lazy_exact_nt,CGAL :: To_interval> :: zero() 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> *)在diffgeom.a(Particle.o)中 CGAL ::懒惰> >,CGAL :: Point_3>,CGAL :: Gmpq,CGAL :: Cartesian_converter,CGAL :: Simple_cartesian>,CGAL :: NT_converter> > diffgeom.a中的> :: zero()(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>>> * )在diffgeom.a(Particle.o) CGAL ::懒惰> >,CGAL :: Sphere_3>,CGAL :: Gmpq,CGAL :: Cartesian_converter,CGAL :: Simple_cartesian>,CGAL :: NT_converter> > diffgeom.a中的> :: zero()(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>>> * )在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> > :: reset(CGAL :: Lazy,CGAL :: Gmpq,CGAL :: Lazy_exact_nt,CGAL :: To_interval> *)在diffgeom.a(Particle.o)中 boost :: thread_specific_ptr,CGAL :: Gmpq,CGAL :: Lazy_exact_nt,CGAL :: To_interval> diffgeom.a中的> ::〜thread_specific_ptr()(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>>> * )在diffgeom.a(Particle.o) boost :: thread_specific_ptr> >,CGAL :: Point_3>,CGAL :: Gmpq,CGAL :: Cartesian_converter,CGAL :: Simple_cartesian>,CGAL :: NT_converter> > > diffgeom.a中的> ::〜thread_specific_ptr()(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>>> * )在diffgeom.a(Particle.o) boost :: thread_specific_ptr> >,CGAL :: Sphere_3>,CGAL :: Gmpq,CGAL :: Cartesian_converter,CGAL :: Simple_cartesian>,CGAL :: NT_converter> > > diffgeom.a中的> ::〜thread_specific_ptr()(Particle.o) " _mpfr_clear",引自: CGAL :: cpp11 :: result_of> >,CGAL :: CartesianKernelFunctors :: Compute_squared_radius_3> > (CGAL :: Sphere_3)> ::类型CGAL :: Lazy_construction_nt> >,CGAL :: CartesianKernelFunctors :: Compute_squared_radius_3> > :: operator()>(CGAL :: Sphere_3 const&)const在diffgeom.a(Particle.o) CGAL :: Cartesian_converter,CGAL :: Simple_cartesian>,CGAL :: NT_converter> > :: operator()(CGAL :: Point_3> const&)const在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&)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在diffgeom.a(Particle.o) ... " _mpfr_get_d",引自: CGAL :: cpp11 :: result_of> >,CGAL :: CartesianKernelFunctors :: Compute_squared_radius_3> > (CGAL :: Sphere_3)> ::类型CGAL :: Lazy_construction_nt> >,CGAL :: CartesianKernelFunctors :: Compute_squared_radius_3> > :: operator()>(CGAL :: Sphere_3 const&)const在diffgeom.a(Particle.o) CGAL :: Cartesian_converter,CGAL :: Simple_cartesian>,CGAL :: NT_converter> > :: operator()(CGAL :: Point_3> const&)const在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&)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在diffgeom.a(Particle.o) ... " _mpfr_init2",引自: CGAL :: cpp11 :: result_of> >,CGAL :: CartesianKernelFunctors :: Compute_squared_radius_3> > (CGAL :: Sphere_3)> ::类型CGAL :: Lazy_construction_nt> >,CGAL :: CartesianKernelFunctors :: Compute_squared_radius_3> > :: operator()>(CGAL :: Sphere_3 const&)const在diffgeom.a(Particle.o) CGAL :: Cartesian_converter,CGAL :: Simple_cartesian>,CGAL :: NT_converter> > :: operator()(CGAL :: Point_3> const&)const在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&)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在diffgeom.a(Particle.o) ... " _mpfr_set_q",引自: CGAL :: cpp11 :: result_of> >,CGAL :: CartesianKernelFunctors :: Compute_squared_radius_3> > (CGAL :: Sphere_3)> ::类型CGAL :: Lazy_construction_nt> >,CGAL :: CartesianKernelFunctors :: Compute_squared_radius_3> > :: operator()>(CGAL :: Sphere_3 const&)const在diffgeom.a(Particle.o) CGAL :: Cartesian_converter,CGAL :: Simple_cartesian>,CGAL :: NT_converter> > :: operator()(CGAL :: Point_3> const&)const在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&)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在diffgeom.a(Particle.o) ... ld:找不到架构x86_64的符号 clang:错误:链接器命令失败,退出代码为1(使用-v查看调用) make: * [/ Users / bullard / ShapeMetrology / Particle / bin / diffgeom]错误1
我在链接命令中错过了一个CGAL库吗?再次,当我使用CGAL计算凸包时,我没有遇到任何麻烦,但是现在这个问题似乎已经出现,我试图包括表面网格划分。
我很乐意发布代码的相关部分,如果这会有所帮助,但在这一点上我不知道哪些部分是相关的。