Skip to Content.
Sympa Menu

cgal-discuss - Re: [cgal-discuss] problem with CGAL and CMAKE - mostly SOLVED

Subject: CGAL users discussion list

List archive

Re: [cgal-discuss] problem with CGAL and CMAKE - mostly SOLVED


Chronological Thread 
  • From: "Sebastien Loriot (GeometryFactory)" <>
  • To:
  • Subject: Re: [cgal-discuss] problem with CGAL and CMAKE - mostly SOLVED
  • Date: Mon, 03 Oct 2011 08:17:22 +0200

The following in your config is strange:
set(CGAL_LIBRARY "D:/winappl/CGAL/lib/")
set(CGAL_Core_LIBRARY "D:/winappl/CGAL/lib/")
set(CGAL_ImageIO_LIBRARY "D:/winappl/CGAL/lib/")
set(CGAL_Qt3_LIBRARY "D:/winappl/CGAL/lib/" )
set(CGAL_Qt4_LIBRARY "D:/winappl/CGAL/lib/" )


it should be path to the library. You should probably clear the cmakecache and try configure it again.

Sebastien.

Petr Felkel wrote:
Hi,

I have probably found the reason of unresolved externals:

While instaling CGAL, I had installed a 64bit version of auxiliary libraries.
After instalation of 32bit version, I can compile my code (on my 64 bit system).

But the warnings remained:
WARNING: Target "example_2" requests linking to directory "D:/winappl/CGAL/lib/". Targets may link only to libraries. CMake is dropping the item.

I will be glad if somebody knows he answer.

Best regards
Petr

Dne 2.10.2011 12:35, Petr Felkel napsal(a):
Hi,

I need to migrate to Win7/VS2010 with CGAL.
I have installed CGAL 3.8 with additional libraries, but I cannot compile anything, not even the CGAL examples.

I have tried two slightly different methods for CGAL compilation - with and without CGAL_AUTOLINK_GMP and CGAL_AUTOLINK_MPFR
Both do not work.

Maybe - could be an error in the variables in the main CGAL configuration file (CGALConfig.cmake in d:\winappl\CGAL\lib\CGAL\ directory?:
set(CGAL_LIBRARY "D:/winappl/CGAL/lib/")
set(CGAL_Core_LIBRARY "D:/winappl/CGAL/lib/")
set(CGAL_ImageIO_LIBRARY "D:/winappl/CGAL/lib/")
set(CGAL_Qt3_LIBRARY "D:/winappl/CGAL/lib/" )
set(CGAL_Qt4_LIBRARY "D:/winappl/CGAL/lib/" )

I thought that these variables will be set by the cmake-gui ..

I put CGALConfig.cmake and CMakeCache.txt as attachments...

Thank you for your help - I try to solve this for more than two weks without any light at the end of the tunnel...

Bets regards
Petr

My two trials:

I. CGAL compiled with CGAL_AUTOLINK_GMPand CGAL_AUTOLINK_MPFR unclicked

1. CGAL: CMAKE-GUI ..
* Configure / Generate -- OK
2. D:/winappl/CGAL-3.8/examples/Triangulation_2
* CMAKE-GUI .
o Configure OK
o Generate full of warnings:
WARNING: Target "adding_handles" requests linking to
directory "D:/winappl/CGAL/lib/". Targets may link
only to libraries. CMake is dropping the item.
* Visual Studio 2010
o Build Clean
o Build ALL_BUILD
========= Build: 1 succeeded, 14 failed, 0
up-to-date, 1 skipped =========
- 121 errors - unresolved external - for example:
hierarchy.cpp
2>triangulation_prog1.obj : error LNK2019:
unresolved external symbol __imp____gmpq_clear
referenced in function "public: __thiscall
CGAL::Gmpq_rep::~Gmpq_rep(void)"

(??1Gmpq_rep@CGAL@@QAE@XZ)
2>triangulation_prog1.obj : error LNK2019:
unresolved external symbol __imp____gmpq_set_d
referenced in function "public: __thiscall
CGAL::Gmpq::Gmpq(double)"
(??0Gmpq@CGAL@@QAE@N@Z)

II. CGAL compiled with CGAL_AUTOLINK_GMPand CGAL_AUTOLINK_MPFR clicked (selected)

1. CGAL: CMAKE-GUI ..
* Configure / Generate -- OK
2. D:/winappl/CGAL-3.8/examples/Triangulation_2
* CMAKE-GUI .
o Configure OK
o Generate OK
* Visual Studio 2010
o Build Clean
+ Build ALL_BUILD
- the same set of 121 errors - unresolved
external - for example:
========== Build: 2 succeeded, 14 failed, 0
up-to-date, 0 skipped ==========
9> hierarchy.cpp
2>triangulation_prog1.obj : error LNK2019:
unresolved external symbol __imp____gmpq_clear
referenced in function "public: __thiscall
CGAL::Gmpq_rep::~Gmpq_rep(void)"

(??1Gmpq_rep@CGAL@@QAE@XZ)
2>triangulation_prog1.obj : error LNK2019:
unresolved external symbol __imp____gmpq_set_d
referenced in function "public: __thiscall
CGAL::Gmpq::Gmpq(double)"
(??0Gmpq@CGAL@@QAE@N@Z)
+

+






Archive powered by MHonArc 2.6.16.

Top of Page