Cannot make CGAL examples in Cygwin

113 views Asked by At

I am unable to build some of the CGAL examples under Cygwin. All of the failing examples share similar error messages.

Any guidance would be most appreciated.

Following are the steps that I followed and a sample error from a "make".

Cygwin (x64) installed under Windows 7 to d:\cygwin64.

CGAL source downloaded from https://github.com/CGAL/cgal/releases/download/releases%2FCGAL-4.9/CGAL-4.9.zip and unzipped to D:\cygwin64\usr\CGAL-4.9

All libraries supposedly needed for CGAL were installed via the Cygwin x64 setup.

Initial cmake:


    cd /usr/CGAL-4.9
    cmake -DCMAKE_LEGACY_CYGWIN_WIN32=1 -DWITH_CGAL_Qt5=OFF -DWITH_examples=ON  .

Some examples could not be configured, these included the mesh and Scale_space_reconstruction_3 examples.


    cd /usr/CGAL-4.9
    make
    make examples

The first few examples were created successfully. For example,


    PATH=/usr/local/bin:/usr/bin:/bin:/lib:/usr/CGAL-4.9/bin:/usr/CGAL-4.9/lib
    cd /usr/CGAL-4.9/examples/AABB_tree
    ./AABB_triangle_3_example.exe
    3 intersections(s) with ray query
    closest point is: 0.333333 0.333333 0.333333
    squared distance: 8.33333

A later example demonstrates a nagging problem that shows up in a number of the examples:


    cd /usr/CGAL-4.9/examples/Snap_rounding_2/
    cmake -DCGAL_DIR=/usr/CGAL-4.9 .
    make

    Scanning dependencies of target snap_rounding
    [ 16%] Building CXX object CMakeFiles/snap_rounding.dir/snap_rounding.cpp.o
    In file included from /usr/CGAL-4.9/include/CGAL/CORE/CoreDefs.h:41:0,
                     from /usr/CGAL-4.9/include/CGAL/CORE/BigFloatRep.h:40,
                     from /usr/CGAL-4.9/include/CGAL/CORE/BigFloat.h:38,
                     from /usr/CGAL-4.9/include/CGAL/CORE_BigFloat.h:27,
                     from /usr/CGAL-4.9/include/CGAL/CORE_arithmetic_kernel.h:39,
                     from /usr/CGAL-4.9/include/CGAL/Arithmetic_kernel.h:51,
                     from /usr/CGAL-4.9/include/CGAL/Arr_rational_function_traits_2.h:28,
                     from /usr/CGAL-4.9/include/CGAL/Sweep_line_2_algorithms.h:37,
                     from /usr/CGAL-4.9/include/CGAL/Snap_rounding_2.h:28,
                     from /usr/CGAL-4.9/examples/Snap_rounding_2/snap_rounding.cpp: :
    /usr/CGAL-4.9/include/CGAL/CORE/extLong.h:171:8: warning: ‘CORE::extLong::extLong(int)’ redeclared without dllimport attribute after being referenced with dll linkage
     inline extLong::extLong(int i) : val(i), flag(0) {
            ^
    /usr/CGAL-4.9/include/CGAL/CORE/extLong.h:292:13: warning: ‘bool CORE::extLong::isNaN() const’ redeclared without dllimport attribute after being referenced with dll linkage
     inline bool extLong::isNaN() const {

There are a number of similar errors that have been omitted here.

Thanks!!!

1

There are 1 answers

0
matzeri On

As the errors, that you are not reporting, are likely due to wrong importing directive, you can try the following:

On include/CGAL/export/helpers.h replace

#  if defined(_WIN32) || defined(__CYGWIN__)
with
#  if defined(_WIN32)

and then build with

cmake -DWITH_CGAL_Qt5=OFF -DWITH_examples=ON

for what I see the build works much better (20% done in one our and still going)