CGAL 示例的编译错误
Compilation errors on CGAL examples
我正在尝试按照官方 guide:
在我的计算机上安装 CGAL
在使用 vcpkg 安装 CGAL 和 Qt5 之后,我按照描述通过 CMake 生成了 VS 解决方案。但是现在我在 VS 中构建解决方案时遇到以下错误:
1>------ Build started: Project: ZERO_CHECK, Configuration: Debug x64 ------
1>Checking Build System
2>------ Build started: Project: CGAL_Qt5_moc_and_resources, Configuration: Debug x64 ------
3>------ Build started: Project: adding_handles, Configuration: Debug x64 ------
4>------ Build started: Project: colored_face, Configuration: Debug x64 ------
5>------ Build started: Project: constrained, Configuration: Debug x64 ------
6>------ Build started: Project: constrained_hierarchy_plus, Configuration: Debug x64 ------
7>------ Build started: Project: constrained_plus, Configuration: Debug x64 ------
8>------ Build started: Project: copy_triangulation_2, Configuration: Debug x64 ------
9>------ Build started: Project: for_loop_2, Configuration: Debug x64 ------
2>Automatic MOC for target CGAL_Qt5_moc_and_resources
4>Building Custom Rule C:/Users/alexa/CGAL-5.0/examples/Triangulation_2/CMakeLists.txt
3>Building Custom Rule C:/Users/alexa/CGAL-5.0/examples/Triangulation_2/CMakeLists.txt
6>Building Custom Rule C:/Users/alexa/CGAL-5.0/examples/Triangulation_2/CMakeLists.txt
7>Building Custom Rule C:/Users/alexa/CGAL-5.0/examples/Triangulation_2/CMakeLists.txt
8>Building Custom Rule C:/Users/alexa/CGAL-5.0/examples/Triangulation_2/CMakeLists.txt
5>Building Custom Rule C:/Users/alexa/CGAL-5.0/examples/Triangulation_2/CMakeLists.txt
3>adding_handles.cpp
9>Building Custom Rule C:/Users/alexa/CGAL-5.0/examples/Triangulation_2/CMakeLists.txt
4>colored_face.cpp
7>constrained_plus.cpp
8>copy_triangulation_2.cpp
6>constrained_hierarchy_plus.cpp
9>for_loop_2.cpp
5>constrained.cpp
2>Generating ui_ImageInterface.h
2>Building Custom Rule C:/Users/alexa/CGAL-5.0/examples/Triangulation_2/CMakeLists.txt
2>mocs_compilation.cpp
4>C:\Users\alexa\CGAL-5.0\examples\Triangulation_2\colored_face.cpp(23,46): error C2039: 'finite_face_handles': is not a member of 'CGAL::Triangulation_2<K,Tds>'
4>C:\Users\alexa\CGAL-5.0\examples\Triangulation_2\colored_face.cpp(11): message : see declaration of 'CGAL::Triangulation_2<K,Tds>'
4>C:\Users\alexa\CGAL-5.0\examples\Triangulation_2\colored_face.cpp(24,5): error C2065: 'f': undeclared identifier
4>C:\Users\alexa\CGAL-5.0\examples\Triangulation_2\colored_face.cpp(24,23): error C2039: 'blue': is not a member of 'CGAL'
4>C:\vcpkg\installed\x64-windows\include\CGAL/Triangulation_face_base_with_info_2.h(32): message : see declaration of 'CGAL'
4>C:\Users\alexa\CGAL-5.0\examples\Triangulation_2\colored_face.cpp(24,27): error C3861: 'blue': identifier not found
4>C:\Users\alexa\CGAL-5.0\examples\Triangulation_2\colored_face.cpp(28,22): error C2039: 'red': is not a member of 'CGAL'
4>C:\vcpkg\installed\x64-windows\include\CGAL/Triangulation_face_base_with_info_2.h(32): message : see declaration of 'CGAL'
4>C:\Users\alexa\CGAL-5.0\examples\Triangulation_2\colored_face.cpp(28,25): error C3861: 'red': identifier not found
9>C:\Users\alexa\CGAL-5.0\examples\Triangulation_2\for_loop_2.cpp(10,24): error C2039: 'Finite_vertex_handles': is not a member of 'CGAL::Triangulation_2<K,CGAL::Triangulation_data_structure_2<CGAL::Triangulation_vertex_base_2<Gt,CGAL::Triangulation_ds_vertex_base_2<void>>,CGAL::Triangulation_face_base_2<Gt,CGAL::Triangulation_ds_face_base_2<void>>>>'
9>C:\Users\alexa\CGAL-5.0\examples\Triangulation_2\for_loop_2.cpp(10,24): error C2039: with
9>C:\Users\alexa\CGAL-5.0\examples\Triangulation_2\for_loop_2.cpp(10,24): error C2039: [
9>C:\Users\alexa\CGAL-5.0\examples\Triangulation_2\for_loop_2.cpp(10,24): error C2039: Gt=K
9>C:\Users\alexa\CGAL-5.0\examples\Triangulation_2\for_loop_2.cpp(10,24): error C2039: ]
9>C:\Users\alexa\CGAL-5.0\examples\Triangulation_2\for_loop_2.cpp(7): message : see declaration of 'CGAL::Triangulation_2<K,CGAL::Triangulation_data_structure_2<CGAL::Triangulation_vertex_base_2<Gt,CGAL::Triangulation_ds_vertex_base_2<void>>,CGAL::Triangulation_face_base_2<Gt,CGAL::Triangulation_ds_face_base_2<void>>>>'
9>C:\Users\alexa\CGAL-5.0\examples\Triangulation_2\for_loop_2.cpp(7): message : with
9>C:\Users\alexa\CGAL-5.0\examples\Triangulation_2\for_loop_2.cpp(7): message : [
9>C:\Users\alexa\CGAL-5.0\examples\Triangulation_2\for_loop_2.cpp(7): message : Gt=K
9>C:\Users\alexa\CGAL-5.0\examples\Triangulation_2\for_loop_2.cpp(7): message : ]
9>C:\Users\alexa\CGAL-5.0\examples\Triangulation_2\for_loop_2.cpp(10,70): error C4430: missing type specifier - int assumed. Note: C++ does not support default-int
9>C:\Users\alexa\CGAL-5.0\examples\Triangulation_2\for_loop_2.cpp(10,49): error C2146: syntax error: missing ';' before identifier 'Finite_vertex_handles'
9>C:\Users\alexa\CGAL-5.0\examples\Triangulation_2\for_loop_2.cpp(16,49): error C2825: 'Finite_vertex_handles': must be a class or namespace when followed by '::'
9>C:\Users\alexa\CGAL-5.0\examples\Triangulation_2\for_loop_2.cpp(16,32): error C2510: 'Finite_vertex_handles': left of '::' must be a class/struct/union
9>C:\Users\alexa\CGAL-5.0\examples\Triangulation_2\for_loop_2.cpp(16,79): error C4430: missing type specifier - int assumed. Note: C++ does not support default-int
9>C:\Users\alexa\CGAL-5.0\examples\Triangulation_2\for_loop_2.cpp(16,49): error C2146: syntax error: missing ';' before identifier 'Finite_vertex_handles_iterator'
9>C:\Users\alexa\CGAL-5.0\examples\Triangulation_2\for_loop_2.cpp(34,35): error C2825: 'Finite_vertex_handles': must be a class or namespace when followed by '::'
4>Done building project "colored_face.vcxproj" -- FAILED.
10>------ Build started: Project: hierarchy, Configuration: Debug x64 ------
9>C:\Users\alexa\CGAL-5.0\examples\Triangulation_2\for_loop_2.cpp(34,26): error C2510: 'Finite_vertex_handles': left of '::' must be a class/struct/union
9>C:\Users\alexa\CGAL-5.0\examples\Triangulation_2\for_loop_2.cpp(35,42): error C2039: 'finite_vertex_handles': is not a member of 'CGAL::Triangulation_2<K,CGAL::Triangulation_data_structure_2<CGAL::Triangulation_vertex_base_2<Gt,CGAL::Triangulation_ds_vertex_base_2<void>>,CGAL::Triangulation_face_base_2<Gt,CGAL::Triangulation_ds_face_base_2<void>>>>'
9>C:\Users\alexa\CGAL-5.0\examples\Triangulation_2\for_loop_2.cpp(35,42): error C2039: with
9>C:\Users\alexa\CGAL-5.0\examples\Triangulation_2\for_loop_2.cpp(35,42): error C2039: [
9>C:\Users\alexa\CGAL-5.0\examples\Triangulation_2\for_loop_2.cpp(35,42): error C2039: Gt=K
9>C:\Users\alexa\CGAL-5.0\examples\Triangulation_2\for_loop_2.cpp(35,42): error C2039: ]
9>C:\Users\alexa\CGAL-5.0\examples\Triangulation_2\for_loop_2.cpp(7): message : see declaration of 'CGAL::Triangulation_2<K,CGAL::Triangulation_data_structure_2<CGAL::Triangulation_vertex_base_2<Gt,CGAL::Triangulation_ds_vertex_base_2<void>>,CGAL::Triangulation_face_base_2<Gt,CGAL::Triangulation_ds_face_base_2<void>>>>'
9>C:\Users\alexa\CGAL-5.0\examples\Triangulation_2\for_loop_2.cpp(7): message : with
9>C:\Users\alexa\CGAL-5.0\examples\Triangulation_2\for_loop_2.cpp(7): message : [
9>C:\Users\alexa\CGAL-5.0\examples\Triangulation_2\for_loop_2.cpp(7): message : Gt=K
9>C:\Users\alexa\CGAL-5.0\examples\Triangulation_2\for_loop_2.cpp(7): message : ]
9>C:\Users\alexa\CGAL-5.0\examples\Triangulation_2\for_loop_2.cpp(37,26): error C2100: illegal indirection
9>C:\Users\alexa\CGAL-5.0\examples\Triangulation_2\for_loop_2.cpp(37,26): error C2440: 'initializing': cannot convert from 'iterator' to 'CGAL::internal::CC_iterator<CGAL::Compact_container<CGAL::Triangulation_vertex_base_2<GT,CGAL::Triangulation_ds_vertex_base_2<TDS2>>,CGAL::Default,CGAL::Default,CGAL::Default>,false>'
9>C:\Users\alexa\CGAL-5.0\examples\Triangulation_2\for_loop_2.cpp(37,26): error C2440: with
9>C:\Users\alexa\CGAL-5.0\examples\Triangulation_2\for_loop_2.cpp(37,26): error C2440: [
9>C:\Users\alexa\CGAL-5.0\examples\Triangulation_2\for_loop_2.cpp(37,26): error C2440: GT=K,
9>C:\Users\alexa\CGAL-5.0\examples\Triangulation_2\for_loop_2.cpp(37,26): error C2440: TDS2=CGAL::Triangulation_data_structure_2<CGAL::Triangulation_vertex_base_2<K,CGAL::Triangulation_ds_vertex_base_2<void>>,CGAL::Triangulation_face_base_2<K,CGAL::Triangulation_ds_face_base_2<void>>>
9>C:\Users\alexa\CGAL-5.0\examples\Triangulation_2\for_loop_2.cpp(37,26): error C2440: ]
9>C:\Users\alexa\CGAL-5.0\examples\Triangulation_2\for_loop_2.cpp(37,26): message : No constructor could take the source type, or constructor overload resolution was ambiguous
9>C:\Users\alexa\CGAL-5.0\examples\Triangulation_2\for_loop_2.cpp(42,51): error C2039: 'finite_vertex_handles': is not a member of 'CGAL::Triangulation_2<K,CGAL::Triangulation_data_structure_2<CGAL::Triangulation_vertex_base_2<Gt,CGAL::Triangulation_ds_vertex_base_2<void>>,CGAL::Triangulation_face_base_2<Gt,CGAL::Triangulation_ds_face_base_2<void>>>>'
9>C:\Users\alexa\CGAL-5.0\examples\Triangulation_2\for_loop_2.cpp(42,51): error C2039: with
9>C:\Users\alexa\CGAL-5.0\examples\Triangulation_2\for_loop_2.cpp(42,51): error C2039: [
9>C:\Users\alexa\CGAL-5.0\examples\Triangulation_2\for_loop_2.cpp(42,51): error C2039: Gt=K
9>C:\Users\alexa\CGAL-5.0\examples\Triangulation_2\for_loop_2.cpp(42,51): error C2039: ]
9>C:\Users\alexa\CGAL-5.0\examples\Triangulation_2\for_loop_2.cpp(7): message : see declaration of 'CGAL::Triangulation_2<K,CGAL::Triangulation_data_structure_2<CGAL::Triangulation_vertex_base_2<Gt,CGAL::Triangulation_ds_vertex_base_2<void>>,CGAL::Triangulation_face_base_2<Gt,CGAL::Triangulation_ds_face_base_2<void>>>>'
9>C:\Users\alexa\CGAL-5.0\examples\Triangulation_2\for_loop_2.cpp(7): message : with
9>C:\Users\alexa\CGAL-5.0\examples\Triangulation_2\for_loop_2.cpp(7): message : [
9>C:\Users\alexa\CGAL-5.0\examples\Triangulation_2\for_loop_2.cpp(7): message : Gt=K
9>C:\Users\alexa\CGAL-5.0\examples\Triangulation_2\for_loop_2.cpp(7): message : ]
9>C:\Users\alexa\CGAL-5.0\examples\Triangulation_2\for_loop_2.cpp(43,18): error C2065: 'vh': undeclared identifier
9>Done building project "for_loop_2.vcxproj" -- FAILED.
11>------ Build started: Project: info_insert_with_pair_iterator_2, Configuration: Debug x64 ------
11>Building Custom Rule C:/Users/alexa/CGAL-5.0/examples/Triangulation_2/CMakeLists.txt
10>Building Custom Rule C:/Users/alexa/CGAL-5.0/examples/Triangulation_2/CMakeLists.txt
5>C:\Users\alexa\CGAL-5.0\examples\Triangulation_2\constrained.cpp(25,42): error C2039: 'finite_edges': is not a member of 'CGAL::Constrained_Delaunay_triangulation_2<K,CGAL::Default,Itag>'
5>C:\Users\alexa\CGAL-5.0\examples\Triangulation_2\constrained.cpp(10): message : see declaration of 'CGAL::Constrained_Delaunay_triangulation_2<K,CGAL::Default,Itag>'
5>C:\Users\alexa\CGAL-5.0\examples\Triangulation_2\constrained.cpp(26,28): error C2065: 'e': undeclared identifier
11>info_insert_with_pair_iterator_2.cpp
10>hierarchy.cpp
5>Done building project "constrained.vcxproj" -- FAILED.
12>------ Build started: Project: info_insert_with_pair_iterator_regular_2, Configuration: Debug x64 ------
12>Building Custom Rule C:/Users/alexa/CGAL-5.0/examples/Triangulation_2/CMakeLists.txt
12>info_insert_with_pair_iterator_regular_2.cpp
8>copy_triangulation_2.vcxproj -> C:\Users\alexa\CGAL-5.0\examples\Triangulation_2\build\Debug\copy_triangulation_2.exe
6>constrained_hierarchy_plus.vcxproj -> C:\Users\alexa\CGAL-5.0\examples\Triangulation_2\build\Debug\constrained_hierarchy_plus.exe
11>C:\Users\alexa\CGAL-5.0\examples\Triangulation_2\info_insert_with_pair_iterator_2.cpp(31,51): error C2039: 'finite_vertex_handles': is not a member of 'CGAL::Delaunay_triangulation_2<K,Tds>'
11>C:\Users\alexa\CGAL-5.0\examples\Triangulation_2\info_insert_with_pair_iterator_2.cpp(9): message : see declaration of 'CGAL::Delaunay_triangulation_2<K,Tds>'
11>C:\Users\alexa\CGAL-5.0\examples\Triangulation_2\info_insert_with_pair_iterator_2.cpp(32,17): error C2065: 'v': undeclared identifier
11>C:\Users\alexa\CGAL-5.0\examples\Triangulation_2\info_insert_with_pair_iterator_2.cpp(32,38): error C2065: 'v': undeclared identifier
11>Done building project "info_insert_with_pair_iterator_2.vcxproj" -- FAILED.
13>------ Build started: Project: info_insert_with_transform_iterator_2, Configuration: Debug x64 ------
12>C:\Users\alexa\CGAL-5.0\examples\Triangulation_2\info_insert_with_pair_iterator_regular_2.cpp(34,52): error C2039: 'finite_vertex_handles': is not a member of 'CGAL::Regular_triangulation_2<K,Tds>'
12>C:\Users\alexa\CGAL-5.0\examples\Triangulation_2\info_insert_with_pair_iterator_regular_2.cpp(13): message : see declaration of 'CGAL::Regular_triangulation_2<K,Tds>'
12>C:\Users\alexa\CGAL-5.0\examples\Triangulation_2\info_insert_with_pair_iterator_regular_2.cpp(35,17): error C2065: 'v': undeclared identifier
13>Building Custom Rule C:/Users/alexa/CGAL-5.0/examples/Triangulation_2/CMakeLists.txt
12>C:\Users\alexa\CGAL-5.0\examples\Triangulation_2\info_insert_with_pair_iterator_regular_2.cpp(35,38): error C2065: 'v': undeclared identifier
12>Done building project "info_insert_with_pair_iterator_regular_2.vcxproj" -- FAILED.
14>------ Build started: Project: info_insert_with_zip_iterator_2, Configuration: Debug x64 ------
15>------ Build started: Project: polygon_triangulation, Configuration: Debug x64 ------
13>info_insert_with_transform_iterator_2.cpp
2>qrc_CGAL.cpp
14>Building Custom Rule C:/Users/alexa/CGAL-5.0/examples/Triangulation_2/CMakeLists.txt
2>c1xx: fatal error C1083: Cannot open source file: 'C:\Users\alexa\CGAL-5.0\examples\Triangulation_2\build\qrc_CGAL.cpp': No such file or directory
2>qrc_Input.cpp
2>c1xx: fatal error C1083: Cannot open source file: 'C:\Users\alexa\CGAL-5.0\examples\Triangulation_2\build\qrc_Input.cpp': No such file or directory
2>qrc_File.cpp
2>c1xx: fatal error C1083: Cannot open source file: 'C:\Users\alexa\CGAL-5.0\examples\Triangulation_2\build\qrc_File.cpp': No such file or directory
2>qrc_Triangulation_2.cpp
2>c1xx: fatal error C1083: Cannot open source file: 'C:\Users\alexa\CGAL-5.0\examples\Triangulation_2\build\qrc_Triangulation_2.cpp': No such file or directory
2>Generating Code...
15>Building Custom Rule C:/Users/alexa/CGAL-5.0/examples/Triangulation_2/CMakeLists.txt
14>info_insert_with_zip_iterator_2.cpp
15>polygon_triangulation.cpp
2>C:\Program Files (x86)\Microsoft Visual Studio19\Community\MSBuild\Microsoft\VC\v160\Microsoft.CppCommon.targets(429,5): error MSB6006: "CL.exe" exited with code 2.
2>Done building project "CGAL_Qt5_moc_and_resources.vcxproj" -- FAILED.
16>------ Build started: Project: draw_triangulation_2, Configuration: Debug x64 ------
17>------ Build started: Project: polylines_triangulation, Configuration: Debug x64 ------
16>Building Custom Rule C:/Users/alexa/CGAL-5.0/examples/Triangulation_2/CMakeLists.txt
3>adding_handles.vcxproj -> C:\Users\alexa\CGAL-5.0\examples\Triangulation_2\build\Debug\adding_handles.exe
17>Building Custom Rule C:/Users/alexa/CGAL-5.0/examples/Triangulation_2/CMakeLists.txt
16>draw_triangulation_2.cpp
17>polylines_triangulation.cpp
18>------ Build started: Project: print_cropped_voronoi, Configuration: Debug x64 ------
18>Building Custom Rule C:/Users/alexa/CGAL-5.0/examples/Triangulation_2/CMakeLists.txt
18>print_cropped_voronoi.cpp
10>hierarchy.vcxproj -> C:\Users\alexa\CGAL-5.0\examples\Triangulation_2\build\Debug\hierarchy.exe
13>C:\Users\alexa\CGAL-5.0\examples\Triangulation_2\info_insert_with_transform_iterator_2.cpp(44,51): error C2039: 'finite_vertex_handles': is not a member of 'CGAL::Delaunay_triangulation_2<K,Tds>'
13>C:\Users\alexa\CGAL-5.0\examples\Triangulation_2\info_insert_with_transform_iterator_2.cpp(10): message : see declaration of 'CGAL::Delaunay_triangulation_2<K,Tds>'
13>C:\Users\alexa\CGAL-5.0\examples\Triangulation_2\info_insert_with_transform_iterator_2.cpp(45,17): error C2065: 'v': undeclared identifier
15>C:\Users\alexa\CGAL-5.0\examples\Triangulation_2\polygon_triangulation.cpp(67,50): error C2039: 'all_face_handles': is not a member of 'CGAL::Constrained_Delaunay_triangulation_2<K,TDS,Itag>'
14>C:\Users\alexa\CGAL-5.0\examples\Triangulation_2\info_insert_with_zip_iterator_2.cpp(44,51): error C2039: 'finite_vertex_handles': is not a member of 'CGAL::Delaunay_triangulation_2<K,Tds>'
14>C:\Users\alexa\CGAL-5.0\examples\Triangulation_2\info_insert_with_zip_iterator_2.cpp(10): message : see declaration of 'CGAL::Delaunay_triangulation_2<K,Tds>'
15>C:\Users\alexa\CGAL-5.0\examples\Triangulation_2\polygon_triangulation.cpp(24): message : see declaration of 'CGAL::Constrained_Delaunay_triangulation_2<K,TDS,Itag>'
15>C:\Users\alexa\CGAL-5.0\examples\Triangulation_2\polygon_triangulation.cpp(68,5): error C2065: 'f': undeclared identifier
15>C:\Users\alexa\CGAL-5.0\examples\Triangulation_2\polygon_triangulation.cpp(108,49): error C2039: 'finite_face_handles': is not a member of 'CGAL::Constrained_Delaunay_triangulation_2<K,TDS,Itag>'
15>C:\Users\alexa\CGAL-5.0\examples\Triangulation_2\polygon_triangulation.cpp(24): message : see declaration of 'CGAL::Constrained_Delaunay_triangulation_2<K,TDS,Itag>'
14>C:\Users\alexa\CGAL-5.0\examples\Triangulation_2\info_insert_with_zip_iterator_2.cpp(45,17): error C2065: 'v': undeclared identifier
15>C:\Users\alexa\CGAL-5.0\examples\Triangulation_2\polygon_triangulation.cpp(110,10): error C2065: 'f': undeclared identifier
14>C:\Users\alexa\CGAL-5.0\examples\Triangulation_2\info_insert_with_zip_iterator_2.cpp(45,32): error C2065: 'v': undeclared identifier
15>Done building project "polygon_triangulation.vcxproj" -- FAILED.
19>------ Build started: Project: regular, Configuration: Debug x64 ------
7>constrained_plus.vcxproj -> C:\Users\alexa\CGAL-5.0\examples\Triangulation_2\build\Debug\constrained_plus.exe
14>Done building project "info_insert_with_zip_iterator_2.vcxproj" -- FAILED.
20>------ Build started: Project: terrain, Configuration: Debug x64 ------
19>Building Custom Rule C:/Users/alexa/CGAL-5.0/examples/Triangulation_2/CMakeLists.txt
20>Building Custom Rule C:/Users/alexa/CGAL-5.0/examples/Triangulation_2/CMakeLists.txt
19>regular.cpp
20>terrain.cpp
21>------ Build started: Project: terrain_with_info, Configuration: Debug x64 ------
21>Building Custom Rule C:/Users/alexa/CGAL-5.0/examples/Triangulation_2/CMakeLists.txt
21>terrain_with_info.cpp
17>C:\Users\alexa\CGAL-5.0\examples\Triangulation_2\polylines_triangulation.cpp(22,58): error C2039: 'vertices_in_constraint': is not a member of 'CGAL::Constrained_triangulation_plus_2<CDT>'
17>C:\Users\alexa\CGAL-5.0\examples\Triangulation_2\polylines_triangulation.cpp(12): message : see declaration of 'CGAL::Constrained_triangulation_plus_2<CDT>'
17>C:\Users\alexa\CGAL-5.0\examples\Triangulation_2\polylines_triangulation.cpp(23,18): error C2065: 'vh': undeclared identifier
17>C:\Users\alexa\CGAL-5.0\examples\Triangulation_2\polylines_triangulation.cpp(31,38): error C2039: 'subconstraints': is not a member of 'CGAL::Constrained_triangulation_plus_2<CDT>'
17>C:\Users\alexa\CGAL-5.0\examples\Triangulation_2\polylines_triangulation.cpp(12): message : see declaration of 'CGAL::Constrained_triangulation_plus_2<CDT>'
17>C:\Users\alexa\CGAL-5.0\examples\Triangulation_2\polylines_triangulation.cpp(32,24): error C2065: 'sc': undeclared identifier
17>C:\Users\alexa\CGAL-5.0\examples\Triangulation_2\polylines_triangulation.cpp(32,45): error C2065: 'sc': undeclared identifier
17>C:\Users\alexa\CGAL-5.0\examples\Triangulation_2\polylines_triangulation.cpp(37,56): error C2039: 'contexts': is not a member of 'CGAL::Constrained_triangulation_plus_2<CDT>'
17>C:\Users\alexa\CGAL-5.0\examples\Triangulation_2\polylines_triangulation.cpp(12): message : see declaration of 'CGAL::Constrained_triangulation_plus_2<CDT>'
17>C:\Users\alexa\CGAL-5.0\examples\Triangulation_2\polylines_triangulation.cpp(38,25): error C2065: 'c': undeclared identifier
22>------ Build started: Project: triangulation_prog1, Configuration: Debug x64 ------
13>C:\Users\alexa\CGAL-5.0\examples\Triangulation_2\info_insert_with_transform_iterator_2.cpp(45,32): error C2065: 'v': undeclared identifier
22>Building Custom Rule C:/Users/alexa/CGAL-5.0/examples/Triangulation_2/CMakeLists.txt
13>Done building project "info_insert_with_transform_iterator_2.vcxproj" -- FAILED.
23>------ Build started: Project: voronoi, Configuration: Debug x64 ------
23>Building Custom Rule C:/Users/alexa/CGAL-5.0/examples/Triangulation_2/CMakeLists.txt
22>triangulation_prog1.cpp
23>voronoi.cpp
18>print_cropped_voronoi.vcxproj -> C:\Users\alexa\CGAL-5.0\examples\Triangulation_2\build\Debug\print_cropped_voronoi.exe
17>Done building project "polylines_triangulation.vcxproj" -- FAILED.
20>terrain.vcxproj -> C:\Users\alexa\CGAL-5.0\examples\Triangulation_2\build\Debug\terrain.exe
19>regular.vcxproj -> C:\Users\alexa\CGAL-5.0\examples\Triangulation_2\build\Debug\regular.exe
21>terrain_with_info.vcxproj -> C:\Users\alexa\CGAL-5.0\examples\Triangulation_2\build\Debug\terrain_with_info.exe
16>LINK : fatal error LNK1104: cannot open file 'Debug\CGAL_Qt5_moc_and_resources.lib'
16>Done building project "draw_triangulation_2.vcxproj" -- FAILED.
22>triangulation_prog1.vcxproj -> C:\Users\alexa\CGAL-5.0\examples\Triangulation_2\build\Debug\triangulation_prog1.exe
23>voronoi.vcxproj -> C:\Users\alexa\CGAL-5.0\examples\Triangulation_2\build\Debug\voronoi.exe
24>------ Skipped Build: Project: ALL_BUILD, Configuration: Debug x64 ------
24>Project not selected to build for this solution configuration
========== Build: 12 succeeded, 11 failed, 0 up-to-date, 1 skipped ==========
我注意到 vcpkg 安装了 CGAL 4.14,但我尝试编译的示例已经是 5.0。我已经检查了 4.14 manual 指出 4.14 应该附带示例。可悲的是,vcpkg 版本不包含任何示例,我在网上找不到任何示例。
我的问题是:在使用 vcpkg 安装 CGAL 时我是否遗漏了什么?我在Visual Studio的编译过程中做错了吗?或者我从哪里得到 4.14 的例子来编译和测试?或者他们什么时候将 CGAL 的 vcpkg 版本更新到 5.0?
您有两个解决方案:
- 要么你下载完整的CGAL 4.14源代码from github,里面有例子
- 或者您可以通过 git.
拉取 master 来升级您的 vcpkg 以便它下载 CGAL 5.0
我正在尝试按照官方 guide:
在我的计算机上安装 CGAL在使用 vcpkg 安装 CGAL 和 Qt5 之后,我按照描述通过 CMake 生成了 VS 解决方案。但是现在我在 VS 中构建解决方案时遇到以下错误:
1>------ Build started: Project: ZERO_CHECK, Configuration: Debug x64 ------
1>Checking Build System
2>------ Build started: Project: CGAL_Qt5_moc_and_resources, Configuration: Debug x64 ------
3>------ Build started: Project: adding_handles, Configuration: Debug x64 ------
4>------ Build started: Project: colored_face, Configuration: Debug x64 ------
5>------ Build started: Project: constrained, Configuration: Debug x64 ------
6>------ Build started: Project: constrained_hierarchy_plus, Configuration: Debug x64 ------
7>------ Build started: Project: constrained_plus, Configuration: Debug x64 ------
8>------ Build started: Project: copy_triangulation_2, Configuration: Debug x64 ------
9>------ Build started: Project: for_loop_2, Configuration: Debug x64 ------
2>Automatic MOC for target CGAL_Qt5_moc_and_resources
4>Building Custom Rule C:/Users/alexa/CGAL-5.0/examples/Triangulation_2/CMakeLists.txt
3>Building Custom Rule C:/Users/alexa/CGAL-5.0/examples/Triangulation_2/CMakeLists.txt
6>Building Custom Rule C:/Users/alexa/CGAL-5.0/examples/Triangulation_2/CMakeLists.txt
7>Building Custom Rule C:/Users/alexa/CGAL-5.0/examples/Triangulation_2/CMakeLists.txt
8>Building Custom Rule C:/Users/alexa/CGAL-5.0/examples/Triangulation_2/CMakeLists.txt
5>Building Custom Rule C:/Users/alexa/CGAL-5.0/examples/Triangulation_2/CMakeLists.txt
3>adding_handles.cpp
9>Building Custom Rule C:/Users/alexa/CGAL-5.0/examples/Triangulation_2/CMakeLists.txt
4>colored_face.cpp
7>constrained_plus.cpp
8>copy_triangulation_2.cpp
6>constrained_hierarchy_plus.cpp
9>for_loop_2.cpp
5>constrained.cpp
2>Generating ui_ImageInterface.h
2>Building Custom Rule C:/Users/alexa/CGAL-5.0/examples/Triangulation_2/CMakeLists.txt
2>mocs_compilation.cpp
4>C:\Users\alexa\CGAL-5.0\examples\Triangulation_2\colored_face.cpp(23,46): error C2039: 'finite_face_handles': is not a member of 'CGAL::Triangulation_2<K,Tds>'
4>C:\Users\alexa\CGAL-5.0\examples\Triangulation_2\colored_face.cpp(11): message : see declaration of 'CGAL::Triangulation_2<K,Tds>'
4>C:\Users\alexa\CGAL-5.0\examples\Triangulation_2\colored_face.cpp(24,5): error C2065: 'f': undeclared identifier
4>C:\Users\alexa\CGAL-5.0\examples\Triangulation_2\colored_face.cpp(24,23): error C2039: 'blue': is not a member of 'CGAL'
4>C:\vcpkg\installed\x64-windows\include\CGAL/Triangulation_face_base_with_info_2.h(32): message : see declaration of 'CGAL'
4>C:\Users\alexa\CGAL-5.0\examples\Triangulation_2\colored_face.cpp(24,27): error C3861: 'blue': identifier not found
4>C:\Users\alexa\CGAL-5.0\examples\Triangulation_2\colored_face.cpp(28,22): error C2039: 'red': is not a member of 'CGAL'
4>C:\vcpkg\installed\x64-windows\include\CGAL/Triangulation_face_base_with_info_2.h(32): message : see declaration of 'CGAL'
4>C:\Users\alexa\CGAL-5.0\examples\Triangulation_2\colored_face.cpp(28,25): error C3861: 'red': identifier not found
9>C:\Users\alexa\CGAL-5.0\examples\Triangulation_2\for_loop_2.cpp(10,24): error C2039: 'Finite_vertex_handles': is not a member of 'CGAL::Triangulation_2<K,CGAL::Triangulation_data_structure_2<CGAL::Triangulation_vertex_base_2<Gt,CGAL::Triangulation_ds_vertex_base_2<void>>,CGAL::Triangulation_face_base_2<Gt,CGAL::Triangulation_ds_face_base_2<void>>>>'
9>C:\Users\alexa\CGAL-5.0\examples\Triangulation_2\for_loop_2.cpp(10,24): error C2039: with
9>C:\Users\alexa\CGAL-5.0\examples\Triangulation_2\for_loop_2.cpp(10,24): error C2039: [
9>C:\Users\alexa\CGAL-5.0\examples\Triangulation_2\for_loop_2.cpp(10,24): error C2039: Gt=K
9>C:\Users\alexa\CGAL-5.0\examples\Triangulation_2\for_loop_2.cpp(10,24): error C2039: ]
9>C:\Users\alexa\CGAL-5.0\examples\Triangulation_2\for_loop_2.cpp(7): message : see declaration of 'CGAL::Triangulation_2<K,CGAL::Triangulation_data_structure_2<CGAL::Triangulation_vertex_base_2<Gt,CGAL::Triangulation_ds_vertex_base_2<void>>,CGAL::Triangulation_face_base_2<Gt,CGAL::Triangulation_ds_face_base_2<void>>>>'
9>C:\Users\alexa\CGAL-5.0\examples\Triangulation_2\for_loop_2.cpp(7): message : with
9>C:\Users\alexa\CGAL-5.0\examples\Triangulation_2\for_loop_2.cpp(7): message : [
9>C:\Users\alexa\CGAL-5.0\examples\Triangulation_2\for_loop_2.cpp(7): message : Gt=K
9>C:\Users\alexa\CGAL-5.0\examples\Triangulation_2\for_loop_2.cpp(7): message : ]
9>C:\Users\alexa\CGAL-5.0\examples\Triangulation_2\for_loop_2.cpp(10,70): error C4430: missing type specifier - int assumed. Note: C++ does not support default-int
9>C:\Users\alexa\CGAL-5.0\examples\Triangulation_2\for_loop_2.cpp(10,49): error C2146: syntax error: missing ';' before identifier 'Finite_vertex_handles'
9>C:\Users\alexa\CGAL-5.0\examples\Triangulation_2\for_loop_2.cpp(16,49): error C2825: 'Finite_vertex_handles': must be a class or namespace when followed by '::'
9>C:\Users\alexa\CGAL-5.0\examples\Triangulation_2\for_loop_2.cpp(16,32): error C2510: 'Finite_vertex_handles': left of '::' must be a class/struct/union
9>C:\Users\alexa\CGAL-5.0\examples\Triangulation_2\for_loop_2.cpp(16,79): error C4430: missing type specifier - int assumed. Note: C++ does not support default-int
9>C:\Users\alexa\CGAL-5.0\examples\Triangulation_2\for_loop_2.cpp(16,49): error C2146: syntax error: missing ';' before identifier 'Finite_vertex_handles_iterator'
9>C:\Users\alexa\CGAL-5.0\examples\Triangulation_2\for_loop_2.cpp(34,35): error C2825: 'Finite_vertex_handles': must be a class or namespace when followed by '::'
4>Done building project "colored_face.vcxproj" -- FAILED.
10>------ Build started: Project: hierarchy, Configuration: Debug x64 ------
9>C:\Users\alexa\CGAL-5.0\examples\Triangulation_2\for_loop_2.cpp(34,26): error C2510: 'Finite_vertex_handles': left of '::' must be a class/struct/union
9>C:\Users\alexa\CGAL-5.0\examples\Triangulation_2\for_loop_2.cpp(35,42): error C2039: 'finite_vertex_handles': is not a member of 'CGAL::Triangulation_2<K,CGAL::Triangulation_data_structure_2<CGAL::Triangulation_vertex_base_2<Gt,CGAL::Triangulation_ds_vertex_base_2<void>>,CGAL::Triangulation_face_base_2<Gt,CGAL::Triangulation_ds_face_base_2<void>>>>'
9>C:\Users\alexa\CGAL-5.0\examples\Triangulation_2\for_loop_2.cpp(35,42): error C2039: with
9>C:\Users\alexa\CGAL-5.0\examples\Triangulation_2\for_loop_2.cpp(35,42): error C2039: [
9>C:\Users\alexa\CGAL-5.0\examples\Triangulation_2\for_loop_2.cpp(35,42): error C2039: Gt=K
9>C:\Users\alexa\CGAL-5.0\examples\Triangulation_2\for_loop_2.cpp(35,42): error C2039: ]
9>C:\Users\alexa\CGAL-5.0\examples\Triangulation_2\for_loop_2.cpp(7): message : see declaration of 'CGAL::Triangulation_2<K,CGAL::Triangulation_data_structure_2<CGAL::Triangulation_vertex_base_2<Gt,CGAL::Triangulation_ds_vertex_base_2<void>>,CGAL::Triangulation_face_base_2<Gt,CGAL::Triangulation_ds_face_base_2<void>>>>'
9>C:\Users\alexa\CGAL-5.0\examples\Triangulation_2\for_loop_2.cpp(7): message : with
9>C:\Users\alexa\CGAL-5.0\examples\Triangulation_2\for_loop_2.cpp(7): message : [
9>C:\Users\alexa\CGAL-5.0\examples\Triangulation_2\for_loop_2.cpp(7): message : Gt=K
9>C:\Users\alexa\CGAL-5.0\examples\Triangulation_2\for_loop_2.cpp(7): message : ]
9>C:\Users\alexa\CGAL-5.0\examples\Triangulation_2\for_loop_2.cpp(37,26): error C2100: illegal indirection
9>C:\Users\alexa\CGAL-5.0\examples\Triangulation_2\for_loop_2.cpp(37,26): error C2440: 'initializing': cannot convert from 'iterator' to 'CGAL::internal::CC_iterator<CGAL::Compact_container<CGAL::Triangulation_vertex_base_2<GT,CGAL::Triangulation_ds_vertex_base_2<TDS2>>,CGAL::Default,CGAL::Default,CGAL::Default>,false>'
9>C:\Users\alexa\CGAL-5.0\examples\Triangulation_2\for_loop_2.cpp(37,26): error C2440: with
9>C:\Users\alexa\CGAL-5.0\examples\Triangulation_2\for_loop_2.cpp(37,26): error C2440: [
9>C:\Users\alexa\CGAL-5.0\examples\Triangulation_2\for_loop_2.cpp(37,26): error C2440: GT=K,
9>C:\Users\alexa\CGAL-5.0\examples\Triangulation_2\for_loop_2.cpp(37,26): error C2440: TDS2=CGAL::Triangulation_data_structure_2<CGAL::Triangulation_vertex_base_2<K,CGAL::Triangulation_ds_vertex_base_2<void>>,CGAL::Triangulation_face_base_2<K,CGAL::Triangulation_ds_face_base_2<void>>>
9>C:\Users\alexa\CGAL-5.0\examples\Triangulation_2\for_loop_2.cpp(37,26): error C2440: ]
9>C:\Users\alexa\CGAL-5.0\examples\Triangulation_2\for_loop_2.cpp(37,26): message : No constructor could take the source type, or constructor overload resolution was ambiguous
9>C:\Users\alexa\CGAL-5.0\examples\Triangulation_2\for_loop_2.cpp(42,51): error C2039: 'finite_vertex_handles': is not a member of 'CGAL::Triangulation_2<K,CGAL::Triangulation_data_structure_2<CGAL::Triangulation_vertex_base_2<Gt,CGAL::Triangulation_ds_vertex_base_2<void>>,CGAL::Triangulation_face_base_2<Gt,CGAL::Triangulation_ds_face_base_2<void>>>>'
9>C:\Users\alexa\CGAL-5.0\examples\Triangulation_2\for_loop_2.cpp(42,51): error C2039: with
9>C:\Users\alexa\CGAL-5.0\examples\Triangulation_2\for_loop_2.cpp(42,51): error C2039: [
9>C:\Users\alexa\CGAL-5.0\examples\Triangulation_2\for_loop_2.cpp(42,51): error C2039: Gt=K
9>C:\Users\alexa\CGAL-5.0\examples\Triangulation_2\for_loop_2.cpp(42,51): error C2039: ]
9>C:\Users\alexa\CGAL-5.0\examples\Triangulation_2\for_loop_2.cpp(7): message : see declaration of 'CGAL::Triangulation_2<K,CGAL::Triangulation_data_structure_2<CGAL::Triangulation_vertex_base_2<Gt,CGAL::Triangulation_ds_vertex_base_2<void>>,CGAL::Triangulation_face_base_2<Gt,CGAL::Triangulation_ds_face_base_2<void>>>>'
9>C:\Users\alexa\CGAL-5.0\examples\Triangulation_2\for_loop_2.cpp(7): message : with
9>C:\Users\alexa\CGAL-5.0\examples\Triangulation_2\for_loop_2.cpp(7): message : [
9>C:\Users\alexa\CGAL-5.0\examples\Triangulation_2\for_loop_2.cpp(7): message : Gt=K
9>C:\Users\alexa\CGAL-5.0\examples\Triangulation_2\for_loop_2.cpp(7): message : ]
9>C:\Users\alexa\CGAL-5.0\examples\Triangulation_2\for_loop_2.cpp(43,18): error C2065: 'vh': undeclared identifier
9>Done building project "for_loop_2.vcxproj" -- FAILED.
11>------ Build started: Project: info_insert_with_pair_iterator_2, Configuration: Debug x64 ------
11>Building Custom Rule C:/Users/alexa/CGAL-5.0/examples/Triangulation_2/CMakeLists.txt
10>Building Custom Rule C:/Users/alexa/CGAL-5.0/examples/Triangulation_2/CMakeLists.txt
5>C:\Users\alexa\CGAL-5.0\examples\Triangulation_2\constrained.cpp(25,42): error C2039: 'finite_edges': is not a member of 'CGAL::Constrained_Delaunay_triangulation_2<K,CGAL::Default,Itag>'
5>C:\Users\alexa\CGAL-5.0\examples\Triangulation_2\constrained.cpp(10): message : see declaration of 'CGAL::Constrained_Delaunay_triangulation_2<K,CGAL::Default,Itag>'
5>C:\Users\alexa\CGAL-5.0\examples\Triangulation_2\constrained.cpp(26,28): error C2065: 'e': undeclared identifier
11>info_insert_with_pair_iterator_2.cpp
10>hierarchy.cpp
5>Done building project "constrained.vcxproj" -- FAILED.
12>------ Build started: Project: info_insert_with_pair_iterator_regular_2, Configuration: Debug x64 ------
12>Building Custom Rule C:/Users/alexa/CGAL-5.0/examples/Triangulation_2/CMakeLists.txt
12>info_insert_with_pair_iterator_regular_2.cpp
8>copy_triangulation_2.vcxproj -> C:\Users\alexa\CGAL-5.0\examples\Triangulation_2\build\Debug\copy_triangulation_2.exe
6>constrained_hierarchy_plus.vcxproj -> C:\Users\alexa\CGAL-5.0\examples\Triangulation_2\build\Debug\constrained_hierarchy_plus.exe
11>C:\Users\alexa\CGAL-5.0\examples\Triangulation_2\info_insert_with_pair_iterator_2.cpp(31,51): error C2039: 'finite_vertex_handles': is not a member of 'CGAL::Delaunay_triangulation_2<K,Tds>'
11>C:\Users\alexa\CGAL-5.0\examples\Triangulation_2\info_insert_with_pair_iterator_2.cpp(9): message : see declaration of 'CGAL::Delaunay_triangulation_2<K,Tds>'
11>C:\Users\alexa\CGAL-5.0\examples\Triangulation_2\info_insert_with_pair_iterator_2.cpp(32,17): error C2065: 'v': undeclared identifier
11>C:\Users\alexa\CGAL-5.0\examples\Triangulation_2\info_insert_with_pair_iterator_2.cpp(32,38): error C2065: 'v': undeclared identifier
11>Done building project "info_insert_with_pair_iterator_2.vcxproj" -- FAILED.
13>------ Build started: Project: info_insert_with_transform_iterator_2, Configuration: Debug x64 ------
12>C:\Users\alexa\CGAL-5.0\examples\Triangulation_2\info_insert_with_pair_iterator_regular_2.cpp(34,52): error C2039: 'finite_vertex_handles': is not a member of 'CGAL::Regular_triangulation_2<K,Tds>'
12>C:\Users\alexa\CGAL-5.0\examples\Triangulation_2\info_insert_with_pair_iterator_regular_2.cpp(13): message : see declaration of 'CGAL::Regular_triangulation_2<K,Tds>'
12>C:\Users\alexa\CGAL-5.0\examples\Triangulation_2\info_insert_with_pair_iterator_regular_2.cpp(35,17): error C2065: 'v': undeclared identifier
13>Building Custom Rule C:/Users/alexa/CGAL-5.0/examples/Triangulation_2/CMakeLists.txt
12>C:\Users\alexa\CGAL-5.0\examples\Triangulation_2\info_insert_with_pair_iterator_regular_2.cpp(35,38): error C2065: 'v': undeclared identifier
12>Done building project "info_insert_with_pair_iterator_regular_2.vcxproj" -- FAILED.
14>------ Build started: Project: info_insert_with_zip_iterator_2, Configuration: Debug x64 ------
15>------ Build started: Project: polygon_triangulation, Configuration: Debug x64 ------
13>info_insert_with_transform_iterator_2.cpp
2>qrc_CGAL.cpp
14>Building Custom Rule C:/Users/alexa/CGAL-5.0/examples/Triangulation_2/CMakeLists.txt
2>c1xx: fatal error C1083: Cannot open source file: 'C:\Users\alexa\CGAL-5.0\examples\Triangulation_2\build\qrc_CGAL.cpp': No such file or directory
2>qrc_Input.cpp
2>c1xx: fatal error C1083: Cannot open source file: 'C:\Users\alexa\CGAL-5.0\examples\Triangulation_2\build\qrc_Input.cpp': No such file or directory
2>qrc_File.cpp
2>c1xx: fatal error C1083: Cannot open source file: 'C:\Users\alexa\CGAL-5.0\examples\Triangulation_2\build\qrc_File.cpp': No such file or directory
2>qrc_Triangulation_2.cpp
2>c1xx: fatal error C1083: Cannot open source file: 'C:\Users\alexa\CGAL-5.0\examples\Triangulation_2\build\qrc_Triangulation_2.cpp': No such file or directory
2>Generating Code...
15>Building Custom Rule C:/Users/alexa/CGAL-5.0/examples/Triangulation_2/CMakeLists.txt
14>info_insert_with_zip_iterator_2.cpp
15>polygon_triangulation.cpp
2>C:\Program Files (x86)\Microsoft Visual Studio19\Community\MSBuild\Microsoft\VC\v160\Microsoft.CppCommon.targets(429,5): error MSB6006: "CL.exe" exited with code 2.
2>Done building project "CGAL_Qt5_moc_and_resources.vcxproj" -- FAILED.
16>------ Build started: Project: draw_triangulation_2, Configuration: Debug x64 ------
17>------ Build started: Project: polylines_triangulation, Configuration: Debug x64 ------
16>Building Custom Rule C:/Users/alexa/CGAL-5.0/examples/Triangulation_2/CMakeLists.txt
3>adding_handles.vcxproj -> C:\Users\alexa\CGAL-5.0\examples\Triangulation_2\build\Debug\adding_handles.exe
17>Building Custom Rule C:/Users/alexa/CGAL-5.0/examples/Triangulation_2/CMakeLists.txt
16>draw_triangulation_2.cpp
17>polylines_triangulation.cpp
18>------ Build started: Project: print_cropped_voronoi, Configuration: Debug x64 ------
18>Building Custom Rule C:/Users/alexa/CGAL-5.0/examples/Triangulation_2/CMakeLists.txt
18>print_cropped_voronoi.cpp
10>hierarchy.vcxproj -> C:\Users\alexa\CGAL-5.0\examples\Triangulation_2\build\Debug\hierarchy.exe
13>C:\Users\alexa\CGAL-5.0\examples\Triangulation_2\info_insert_with_transform_iterator_2.cpp(44,51): error C2039: 'finite_vertex_handles': is not a member of 'CGAL::Delaunay_triangulation_2<K,Tds>'
13>C:\Users\alexa\CGAL-5.0\examples\Triangulation_2\info_insert_with_transform_iterator_2.cpp(10): message : see declaration of 'CGAL::Delaunay_triangulation_2<K,Tds>'
13>C:\Users\alexa\CGAL-5.0\examples\Triangulation_2\info_insert_with_transform_iterator_2.cpp(45,17): error C2065: 'v': undeclared identifier
15>C:\Users\alexa\CGAL-5.0\examples\Triangulation_2\polygon_triangulation.cpp(67,50): error C2039: 'all_face_handles': is not a member of 'CGAL::Constrained_Delaunay_triangulation_2<K,TDS,Itag>'
14>C:\Users\alexa\CGAL-5.0\examples\Triangulation_2\info_insert_with_zip_iterator_2.cpp(44,51): error C2039: 'finite_vertex_handles': is not a member of 'CGAL::Delaunay_triangulation_2<K,Tds>'
14>C:\Users\alexa\CGAL-5.0\examples\Triangulation_2\info_insert_with_zip_iterator_2.cpp(10): message : see declaration of 'CGAL::Delaunay_triangulation_2<K,Tds>'
15>C:\Users\alexa\CGAL-5.0\examples\Triangulation_2\polygon_triangulation.cpp(24): message : see declaration of 'CGAL::Constrained_Delaunay_triangulation_2<K,TDS,Itag>'
15>C:\Users\alexa\CGAL-5.0\examples\Triangulation_2\polygon_triangulation.cpp(68,5): error C2065: 'f': undeclared identifier
15>C:\Users\alexa\CGAL-5.0\examples\Triangulation_2\polygon_triangulation.cpp(108,49): error C2039: 'finite_face_handles': is not a member of 'CGAL::Constrained_Delaunay_triangulation_2<K,TDS,Itag>'
15>C:\Users\alexa\CGAL-5.0\examples\Triangulation_2\polygon_triangulation.cpp(24): message : see declaration of 'CGAL::Constrained_Delaunay_triangulation_2<K,TDS,Itag>'
14>C:\Users\alexa\CGAL-5.0\examples\Triangulation_2\info_insert_with_zip_iterator_2.cpp(45,17): error C2065: 'v': undeclared identifier
15>C:\Users\alexa\CGAL-5.0\examples\Triangulation_2\polygon_triangulation.cpp(110,10): error C2065: 'f': undeclared identifier
14>C:\Users\alexa\CGAL-5.0\examples\Triangulation_2\info_insert_with_zip_iterator_2.cpp(45,32): error C2065: 'v': undeclared identifier
15>Done building project "polygon_triangulation.vcxproj" -- FAILED.
19>------ Build started: Project: regular, Configuration: Debug x64 ------
7>constrained_plus.vcxproj -> C:\Users\alexa\CGAL-5.0\examples\Triangulation_2\build\Debug\constrained_plus.exe
14>Done building project "info_insert_with_zip_iterator_2.vcxproj" -- FAILED.
20>------ Build started: Project: terrain, Configuration: Debug x64 ------
19>Building Custom Rule C:/Users/alexa/CGAL-5.0/examples/Triangulation_2/CMakeLists.txt
20>Building Custom Rule C:/Users/alexa/CGAL-5.0/examples/Triangulation_2/CMakeLists.txt
19>regular.cpp
20>terrain.cpp
21>------ Build started: Project: terrain_with_info, Configuration: Debug x64 ------
21>Building Custom Rule C:/Users/alexa/CGAL-5.0/examples/Triangulation_2/CMakeLists.txt
21>terrain_with_info.cpp
17>C:\Users\alexa\CGAL-5.0\examples\Triangulation_2\polylines_triangulation.cpp(22,58): error C2039: 'vertices_in_constraint': is not a member of 'CGAL::Constrained_triangulation_plus_2<CDT>'
17>C:\Users\alexa\CGAL-5.0\examples\Triangulation_2\polylines_triangulation.cpp(12): message : see declaration of 'CGAL::Constrained_triangulation_plus_2<CDT>'
17>C:\Users\alexa\CGAL-5.0\examples\Triangulation_2\polylines_triangulation.cpp(23,18): error C2065: 'vh': undeclared identifier
17>C:\Users\alexa\CGAL-5.0\examples\Triangulation_2\polylines_triangulation.cpp(31,38): error C2039: 'subconstraints': is not a member of 'CGAL::Constrained_triangulation_plus_2<CDT>'
17>C:\Users\alexa\CGAL-5.0\examples\Triangulation_2\polylines_triangulation.cpp(12): message : see declaration of 'CGAL::Constrained_triangulation_plus_2<CDT>'
17>C:\Users\alexa\CGAL-5.0\examples\Triangulation_2\polylines_triangulation.cpp(32,24): error C2065: 'sc': undeclared identifier
17>C:\Users\alexa\CGAL-5.0\examples\Triangulation_2\polylines_triangulation.cpp(32,45): error C2065: 'sc': undeclared identifier
17>C:\Users\alexa\CGAL-5.0\examples\Triangulation_2\polylines_triangulation.cpp(37,56): error C2039: 'contexts': is not a member of 'CGAL::Constrained_triangulation_plus_2<CDT>'
17>C:\Users\alexa\CGAL-5.0\examples\Triangulation_2\polylines_triangulation.cpp(12): message : see declaration of 'CGAL::Constrained_triangulation_plus_2<CDT>'
17>C:\Users\alexa\CGAL-5.0\examples\Triangulation_2\polylines_triangulation.cpp(38,25): error C2065: 'c': undeclared identifier
22>------ Build started: Project: triangulation_prog1, Configuration: Debug x64 ------
13>C:\Users\alexa\CGAL-5.0\examples\Triangulation_2\info_insert_with_transform_iterator_2.cpp(45,32): error C2065: 'v': undeclared identifier
22>Building Custom Rule C:/Users/alexa/CGAL-5.0/examples/Triangulation_2/CMakeLists.txt
13>Done building project "info_insert_with_transform_iterator_2.vcxproj" -- FAILED.
23>------ Build started: Project: voronoi, Configuration: Debug x64 ------
23>Building Custom Rule C:/Users/alexa/CGAL-5.0/examples/Triangulation_2/CMakeLists.txt
22>triangulation_prog1.cpp
23>voronoi.cpp
18>print_cropped_voronoi.vcxproj -> C:\Users\alexa\CGAL-5.0\examples\Triangulation_2\build\Debug\print_cropped_voronoi.exe
17>Done building project "polylines_triangulation.vcxproj" -- FAILED.
20>terrain.vcxproj -> C:\Users\alexa\CGAL-5.0\examples\Triangulation_2\build\Debug\terrain.exe
19>regular.vcxproj -> C:\Users\alexa\CGAL-5.0\examples\Triangulation_2\build\Debug\regular.exe
21>terrain_with_info.vcxproj -> C:\Users\alexa\CGAL-5.0\examples\Triangulation_2\build\Debug\terrain_with_info.exe
16>LINK : fatal error LNK1104: cannot open file 'Debug\CGAL_Qt5_moc_and_resources.lib'
16>Done building project "draw_triangulation_2.vcxproj" -- FAILED.
22>triangulation_prog1.vcxproj -> C:\Users\alexa\CGAL-5.0\examples\Triangulation_2\build\Debug\triangulation_prog1.exe
23>voronoi.vcxproj -> C:\Users\alexa\CGAL-5.0\examples\Triangulation_2\build\Debug\voronoi.exe
24>------ Skipped Build: Project: ALL_BUILD, Configuration: Debug x64 ------
24>Project not selected to build for this solution configuration
========== Build: 12 succeeded, 11 failed, 0 up-to-date, 1 skipped ==========
我注意到 vcpkg 安装了 CGAL 4.14,但我尝试编译的示例已经是 5.0。我已经检查了 4.14 manual 指出 4.14 应该附带示例。可悲的是,vcpkg 版本不包含任何示例,我在网上找不到任何示例。
我的问题是:在使用 vcpkg 安装 CGAL 时我是否遗漏了什么?我在Visual Studio的编译过程中做错了吗?或者我从哪里得到 4.14 的例子来编译和测试?或者他们什么时候将 CGAL 的 vcpkg 版本更新到 5.0?
您有两个解决方案:
- 要么你下载完整的CGAL 4.14源代码from github,里面有例子
- 或者您可以通过 git. 拉取 master 来升级您的 vcpkg 以便它下载 CGAL 5.0