0

I am a fresh. I try to use CGAL under Cygwin. CGAL seems to be installed successfully, but cannot compile any example, when i try to 'cmake .' (succeeded) -> 'make' (failed) they throw me following bomb,

 make
Scanning dependencies of target delaunay
[100%] Building CXX object CMakeFiles/delaunay.dir/delaunay.cpp.o
In file included from /home/JIN/CGAL-4.4/examples/Core/../../include/CGAL/CORE/CoreDefs.h:41:0,
                 from /home/JIN/CGAL-4.4/examples/Core/../../include/CGAL/CORE/CORE.h:39,
                 from /home/JIN/CGAL-4.4/examples/Core/../../include/CGAL/CORE_coercion_traits.h:33,
                 from /home/JIN/CGAL-4.4/examples/Core/../../include/CGAL/CORE_Expr.h:29,
                 from /home/JIN/CGAL-4.4/examples/Core/delaunay.cpp:2:
/home/JIN/CGAL-4.4/examples/Core/../../include/CGAL/CORE/extLong.h:171:8: warning: ‘CORE::extLong::extLong(int)’ redeclared without dllimport attribute after being referenced with dll linkage [enabled by default]
 inline extLong::extLong(int i) : val(i), flag(0) {
        ^
/home/JIN/CGAL-4.4/examples/Core/../../include/CGAL/CORE/extLong.h:292:13: warning: ‘bool CORE::extLong::isNaN() const’ redeclared without dllimport attribute after being referenced with dll linkage [enabled by default]
 inline bool extLong::isNaN() const {
             ^
In file included from /home/JIN/CGAL-4.4/examples/Core/../../include/CGAL/CORE/BigFloat.h:38:0,
                 from /home/JIN/CGAL-4.4/examples/Core/../../include/CGAL/CORE/RealRep.h:38,
                 from /home/JIN/CGAL-4.4/examples/Core/../../include/CGAL/CORE/Real.h:40,
                 from /home/JIN/CGAL-4.4/examples/Core/../../include/CGAL/CORE/ExprRep.h:42,
                 from /home/JIN/CGAL-4.4/examples/Core/../../include/CGAL/CORE/Expr.h:42,
                 from /home/JIN/CGAL-4.4/examples/Core/../../include/CGAL/CORE/CORE.h:68,
                 from /home/JIN/CGAL-4.4/examples/Core/../../include/CGAL/CORE_coercion_traits.h:33,
                 from /home/JIN/CGAL-4.4/examples/Core/../../include/CGAL/CORE_Expr.h:29,
                 from /home/JIN/CGAL-4.4/examples/Core/delaunay.cpp:2:
/home/JIN/CGAL-4.4/examples/Core/../../include/CGAL/CORE/BigFloatRep.h:266:8: warning: ‘CORE::BigFloatRep::BigFloatRep(const CORE::BigInt&, long unsigned int, long int)’ redeclared without dllimport attribute after being referenced with dll linkage [enabled by default]
 inline BigFloatRep::BigFloatRep(const BigInt& I, unsigned long er, long ex)
        ^
/home/JIN/CGAL-4.4/examples/Core/../../include/CGAL/CORE/BigFloatRep.h:362:13: warning: ‘bool CORE::BigFloatRep::isZeroIn() const’ redeclared without dllimport attribute after being referenced with dll linkage [enabled by default]
 inline bool BigFloatRep::isZeroIn() const {
             ^
make[2]: *** No rule to make target '/usr/local/lib/cygCGAL_Core-10.dll', needed by 'delaunay.exe'.  Stop.
CMakeFiles/Makefile2:63: recipe for target 'CMakeFiles/delaunay.dir/all' failed
make[1]: *** [CMakeFiles/delaunay.dir/all] Error 2
Makefile:75: recipe for target 'all' failed
make: *** [all] Error 2

i have no idea at all. please help me. thank you very much!!!!

Shengye Jin
  • 35
  • 1
  • 6

1 Answers1

0

I am not completely sure of my answer, but it seems that, when you have configured the example inside /home/JIN/CGAL-4.4/examples/Core/, using CMake, you have specified /home/JIN/CGAL-4.4/config as the value of the CGAL_DIR variable. That directory contains the file CGALConfig.cmake that is intended to be used once CGAL is installed. Instead, you should use /home/JIN/CGAL-4.4 as value of CGAL_DIR. That directory contains the CGALConfig.cmake file that must be used to use the in-place build tree of CGAL, without installation.

lrineau
  • 6,036
  • 3
  • 34
  • 47
  • Thank you Irineau, but problem still there, I have seen a lot of problems solution given by you, thanks .... A question more, how can I use CGAL on MAC with the XCode 5.1, since I update my mac, I cannot use CGAL anymore.... – Shengye Jin Apr 17 '14 at 11:15
  • @ShengyeJin Why have you accept my answer if that does not solve your problem? Thanks, anyway. The clang compiler of XCode 5.1 is support since CGAL-4.4. If you have an issue with that version of XCode, please fill another question on Stackoverflow, or post to the CGAL-discuss mailing-list. – lrineau Apr 17 '14 at 11:54
  • Thank you Irineau, actually I did ask on CGAL-discuss, but it seems nobody interested on my question. I will try CGAL 4.4 . – Shengye Jin Apr 17 '14 at 23:29