DTFE: Delaunay Tesselation Field Estimator
https://www.astro.rug.nl/~voronoi/DTFE/dtfe.html
For Mac + HomeBrew,
Need a compiler with OpenMP, but g++-7 seems to have problem linking with Boost (homebrew ver for both)
brew install llvm
1: Change the compiler from g++
to a compiler with OpenMP in Makefile
CC = /usr/local/opt/llvm/bin/clang++
2: Change -lboost_thread
to -lboost_thread-mt
and add -lgmp
to DTFE_LIB
DTFE_LIB = -rdynamic $(LIBRARIES) -lCGAL -lgmp -lboost_thread
-lboost_filesystem -lboost_program_options -lgsl -lgslcblas
-lgmp -lboost_system -L/usr/local/opt/llvm/lib
-Wl,-rpath,/usr/local/opt/llvm/lib
Without -lgmp
, you'll get linking error,
./o/triangulation.o: In function `CGAL::Handle_for<CGAL::Gmpq_rep, std::allocator<CGAL::Gmpq_rep> >::~Handle_for()':
triangulation.cpp:(.text._ZN4CGAL10Handle_forINS_8Gmpq_repESaIS1_EED2Ev[_ZN4CGAL10Handle_forINS_8Gmpq_repESaIS1_EED5Ev]+0x21): undefined reference to `__gmpq_clear'
./o/triangulation.o: In function `boost::operator*(CGAL::Gmpq const&, CGAL::Gmpq const&)':
triangulation.cpp:(.text._ZN5boostmlERKN4CGAL4GmpqES3_[_ZN5boostmlERKN4CGAL4GmpqES3_]+0x2d): undefined reference to `__gmpq_init'
triangulation.cpp:(.text._ZN5boostmlERKN4CGAL4GmpqES3_[_ZN5boostmlERKN4CGAL4GmpqES3_]+0x47): undefined reference to `__gmpq_mul'
triangulation.cpp:(.text._ZN5boostmlERKN4CGAL4GmpqES3_[_ZN5boostmlERKN4CGAL4GmpqES3_]+0x71): undefined reference to `__gmpq_clear'
./o/triangulation.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::Gmpq>, CGAL::NT_converter<double, CGAL::Gmpq> >::operator()(CGAL::Point_3<CGAL::Epick> const&) const':
triangulation.cpp:(.text._ZNK4CGAL19Cartesian_converterINS_21Type_equality_wrapperINS_27Cartesian_base_no_ref_countIdNS_5EpickEEES3_EENS_16Simple_cartesianINS_4GmpqEEENS_12NT_converterIdS7_EEEclERKNS_7Point_3IS3_EE[_ZNK4CGAL19Cartesian_converterINS_21Type_equality_wrapperINS_27Cartesian_base_no_ref_countIdNS_5EpickEEES3_EENS_16Simple_cartesianINS_4GmpqEEENS_12NT_converterIdS7_EEEclERKNS_7Point_3IS3_EE]+0x33): undefined reference to `__gmpq_init'
triangulation.cpp:(.text._ZNK4CGAL19Cartesian_converterINS_21Type_equality_wrapperINS_27Cartesian_base_no_ref_countIdNS_5EpickEEES3_EENS_16Simple_cartesianINS_4GmpqEEENS_12NT_converterIdS7_EEEclERKNS_7Point_3IS3_EE[_ZNK4CGAL19Cartesian_converterINS_21Type_equality_wrapperINS_27Cartesian_base_no_ref_countIdNS_5EpickEEES3_EENS_16Simple_cartesianINS_4GmpqEEENS_12NT_converterIdS7_EEEclERKNS_7Point_3IS3_EE]+0x4d): undefined reference to `__gmpq_set_d'
triangulation.cpp:(.text._ZNK4CGAL19Cartesian_converterINS_21Type_equality_wrapperINS_27Cartesian_base_no_ref_countIdNS_5EpickEEES3_EENS_16Simple_cartesianINS_4GmpqEEENS_12NT_converterIdS7_EEEclERKNS_7Point_3IS3_EE[_ZNK4CGAL19Cartesian_converterINS_21Type_equality_wrapperINS_27Cartesian_base_no_ref_countIdNS_5EpickEEES3_EENS_16Simple_cartesianINS_4GmpqEEENS_12NT_converterIdS7_EEEclERKNS_7Point_3IS3_EE]+0x78): undefined reference to `__gmpq_init'
triangulation.cpp:(.text._ZNK4CGAL19Cartesian_converterINS_21Type_equality_wrapperINS_27Cartesian_base_no_ref_countIdNS_5EpickEEES3_EENS_16Simple_cartesianINS_4GmpqEEENS_12NT_converterIdS7_EEEclERKNS_7Point_3IS3_EE[_ZNK4CGAL19Cartesian_converterINS_21Type_equality_wrapperINS_27Cartesian_base_no_ref_countIdNS_5EpickEEES3_EENS_16Simple_cartesianINS_4GmpqEEENS_12NT_converterIdS7_EEEclERKNS_7Point_3IS3_EE]+0x92): undefined reference to `__gmpq_set_d'
triangulation.cpp:(.text._ZNK4CGAL19Cartesian_converterINS_21Type_equality_wrapperINS_27Cartesian_base_no_ref_countIdNS_5EpickEEES3_EENS_16Simple_cartesianINS_4GmpqEEENS_12NT_converterIdS7_EEEclERKNS_7Point_3IS3_EE[_ZNK4CGAL19Cartesian_converterINS_21Type_equality_wrapperINS_27Cartesian_base_no_ref_countIdNS_5EpickEEES3_EENS_16Simple_cartesianINS_4GmpqEEENS_12NT_converterIdS7_EEEclERKNS_7Point_3IS3_EE]+0xbd): undefined reference to `__gmpq_init'
triangulation.cpp:(.text._ZNK4CGAL19Cartesian_converterINS_21Type_equality_wrapperINS_27Cartesian_base_no_ref_countIdNS_5EpickEEES3_EENS_16Simple_cartesianINS_4GmpqEEENS_12NT_converterIdS7_EEEclERKNS_7Point_3IS3_EE[_ZNK4CGAL19Cartesian_converterINS_21Type_equality_wrapperINS_27Cartesian_base_no_ref_countIdNS_5EpickEEES3_EENS_16Simple_cartesianINS_4GmpqEEENS_12NT_converterIdS7_EEEclERKNS_7Point_3IS3_EE]+0xd7): undefined reference to `__gmpq_set_d'
triangulation.cpp:(.text._ZNK4CGAL19Cartesian_converterINS_21Type_equality_wrapperINS_27Cartesian_base_no_ref_countIdNS_5EpickEEES3_EENS_16Simple_cartesianINS_4GmpqEEENS_12NT_converterIdS7_EEEclERKNS_7Point_3IS3_EE[_ZNK4CGAL19Cartesian_converterINS_21Type_equality_wrapperINS_27Cartesian_base_no_ref_countIdNS_5EpickEEES3_EENS_16Simple_cartesianINS_4GmpqEEENS_12NT_converterIdS7_EEEclERKNS_7Point_3IS3_EE]+0x119): undefined reference to `__gmpq_clear'
triangulation.cpp:(.text._ZNK4CGAL19Cartesian_converterINS_21Type_equality_wrapperINS_27Cartesian_base_no_ref_countIdNS_5EpickEEES3_EENS_16Simple_cartesianINS_4GmpqEEENS_12NT_converterIdS7_EEEclERKNS_7Point_3IS3_EE[_ZNK4CGAL19Cartesian_converterINS_21Type_equality_wrapperINS_27Cartesian_base_no_ref_countIdNS_5EpickEEES3_EENS_16Simple_cartesianINS_4GmpqEEENS_12NT_converterIdS7_EEEclERKNS_7Point_3IS3_EE]+0x139): undefined reference to `__gmpq_clear'
triangulation.cpp:(.text._ZNK4CGAL19Cartesian_converterINS_21Type_equality_wrapperINS_27Cartesian_base_no_ref_countIdNS_5EpickEEES3_EENS_16Simple_cartesianINS_4GmpqEEENS_12NT_converterIdS7_EEEclERKNS_7Point_3IS3_EE[_ZNK4CGAL19Cartesian_converterINS_21Type_equality_wrapperINS_27Cartesian_base_no_ref_countIdNS_5EpickEEES3_EENS_16Simple_cartesianINS_4GmpqEEENS_12NT_converterIdS7_EEEclERKNS_7Point_3IS3_EE]+0x154): undefined reference to `__gmpq_clear'
./o/triangulation.o: In function `CGAL::Same_uncertainty_nt<CGAL::Sign, CGAL::Gmpq>::type CGAL::orientationC2<CGAL::Gmpq>(CGAL::Gmpq const&, CGAL::Gmpq const&, CGAL::Gmpq const&, CGAL::Gmpq const&, CGAL::Gmpq const&, CGAL::Gmpq const&)':
triangulation.cpp:(.text._ZN4CGAL13orientationC2INS_4GmpqEEENS_19Same_uncertainty_ntINS_4SignET_E4typeERKS4_S8_S8_S8_S8_S8_[_ZN4CGAL13orientationC2INS_4GmpqEEENS_19Same_uncertainty_ntINS_4SignET_E4typeERKS4_S8_S8_S8_S8_S8_]+0x4b): undefined reference to `__gmpq_init'