我能够轻松地使用给定示例的CGAL表面网格参数化。这意味着CGAL已正确安装并且功能正常。 重现错误的方法:
cmake .
和make
之后,这就是输出
Scanning dependencies of target Main
[ 33%] Building CXX object CMakeFiles/Main.dir/SBP.cpp.o
:0:15: warning: missing whitespace after the macro name
:0:15: warning: missing whitespace after the macro name
[ 66%] Building CXX object CMakeFiles/Main.dir/main.cpp.o
:0:15: warning: missing whitespace after the macro name
:0:15: warning: missing whitespace after the macro name
[100%] Linking CXX executable Main
CMakeFiles/Main.dir/main.cpp.o: In function _mm_getcsr()':
/usr/local/include/CGAL/Interval_nt.h:202: multiple definition of
CGAL::Surface_mesh_parameterization::get_error_message(int)'
CMakeFiles/Main.dir/SBP.cpp.o:/usr/local/include/CGAL/Surface_mesh_parameterization/Error_code.h:53: first defined here
collect2: error: ld returned 1 exit status
CMakeFiles/Main.dir/build.make:450: recipe for target 'Main' failed
make[2]: * [Main] Error 1
CMakeFiles/Makefile2:67: recipe for target 'CMakeFiles/Main.dir/all' failed
make[1]: * [CMakeFiles/Main.dir/all] Error 2
Makefile:140: recipe for target 'all' failed
make: *** [all] Error 2
我无法找到_mm_getcsr()':
/usr/local/include/CGAL/Interval_nt.h:202: multiple definition of
的任何多重定义。我的CMakeLists.txt文件如下所示:
CGAL::Surface_mesh_parameterization::get_error_message(int)
答案 0 :(得分:0)
快速修复:在inline
前面的文件include / CGAL / Surface_mesh_parameterization / Error_code.h中写const char* get_error_message(int error_code)
。
此修复程序位于此pull request中,现在已合并到CGAL-4.12中。