d-krupke / pyvispoly

CGAL Visibility Polygons in Python
Other
3 stars 0 forks source link

Won't compile under windows #1

Open d-krupke opened 1 year ago

d-krupke commented 1 year ago

Looks like I used some handler wrong, but it works on Linux und Mac. Will have to dive deeper into it.

Additionally, one has to use cmake_args=["-DCMAKE_POLICY_DEFAULT_CMP0091=NEW"], on Windows. Will have to automatically set this in skbuild_conan.

  Building Custom Rule E:/pyvispoly/src/pyvispoly/CMakeLists.txt
  _cgal_bindings.cpp
E:\pyvispoly\src\pyvispoly\_cgal_bindings.cpp(132,38): error C2839: Ungültiger Rückgabetyp "CGAL::Arr_halfedge<V,H,F> **" für überladenen Operator "->" [E:\pyvispoly\_skbuild\win-amd64-3.7\cmake-build\src\pyv
ispoly\_cgal_bindings.vcxproj]
          with
          [
V=CGAL::Arr_vertex_base<CGAL::Point_2<CGAL::Epeck>>,
H=CGAL::Arr_halfedge_base<CGAL::Arr_segment_2<Kernel>>,
              F=CGAL::Arr_face_base
          ]
E:\pyvispoly\src\pyvispoly\_cgal_bindings.cpp(132,40): error C2232: "->CGAL::Iterator_project<CGAL::Arr_face_base::Outer_ccb_iterator,CGAL::Cast_function_object<void *,CGAL::Arr_halfedge<V,H,F> *>,int,int,int
,int>::ptr": Der linke Operand ist vom Typ "class", verwenden Sie "." [E:\pyvispoly\_skbuild\win-amd64-3.7\cmake-build\src\pyvispoly\_cgal_bindings.vcxproj]
          with
          [
V=CGAL::Arr_vertex_base<CGAL::Point_2<CGAL::Epeck>>,
H=CGAL::Arr_halfedge_base<CGAL::Arr_segment_2<Kernel>>,
              F=CGAL::Arr_face_base
          ]
d-krupke commented 1 year ago

cmake_args=["-DCMAKE_POLICY_DEFAULT_CMP0091=NEW"] is now set automatically by skbuild_conan.

d-krupke commented 9 months ago

Tried to get it working but it seems like it returns a different type on Windows than on Unix.

  D:\a\pyvispoly\pyvispoly\src\pyvispoly\_cgal_bindings.cpp(166,26): error C2039: 'twin': is not a member of 'CGAL::Arr_halfedge<V,H,F>' [D:\a\pyvispoly\pyvispoly\_skbuild\win-amd64-3.11\cmake-build\src\pyvispoly\_cgal_bindings.vcxproj]
            with
            [
                V=CGAL::Arr_vertex_base<CGAL::Point_2<CGAL::Epeck>>,
                H=CGAL::Arr_halfedge_base<CGAL::Arr_segment_2<Kernel>>,
                F=CGAL::Arr_face_base
            ]

Maybe ->opposite() works on Windows, but it won't on Unix.

d-krupke commented 9 months ago

There is also a Windows-Pytest Action that can be manually triggered.