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: Wed, 12 Oct 2011 08:29:00 +0200

Did you try to compile the solution after configuration?

Sebastien.

Petr Felkel wrote:
Thank you for your answer.

Yes, I know, library settings in config is strange. But what shal I do with it?
While configuring CGAL I have:

1. started cmake-gui .. in subdirectory of CGAL-3.8 sources.
2. selected File/Delete Cache
3. pressed Configure two times
4. modified the variables WITH_CGAL_Qt3 - unclicked CMAKE_INSTALL_PREFIX = D:/winappl/CGAL ZLIB_INCLUDE_DIR = D:/winappl/zlib/include ZLIB_INCLUDE_LIBRARY = D:/winappl/zlib/lib/zdll.lib
5. pressed configure once

There were warnings:
...
Boost include: d:/winappl/boost_1_47

Boost libraries: optimized;d:/winappl/boost_1_47/lib/libboost_thread-vc100-mt-1_47.lib;debug;d:/winappl/boost_1_47/lib/libboost_thread-vc100-mt-gd-1_47.lib

Boost definitions:

USING BOOST_VERSION = '1.47.0'

CMake Warning (dev) at C:/Program Files (x86)/CMake
2.8/share/cmake-2.8/Modules/FindPackageHandleStandardArgs.cmake:85
(INCLUDE):

File C:/Program Files (x86)/CMake

2.8/share/cmake-2.8/Modules/FindPackageHandleStandardArgs.cmake includes

D:/winappl/CGAL-3.8/cmake/modules/FindPackageMessage.cmake (found via

CMAKE_MODULE_PATH) which shadows C:/Program Files (x86)/CMake

2.8/share/cmake-2.8/Modules/FindPackageMessage.cmake. This may cause

errors later on .

Policy CMP0017 is not set: Prefer files from the CMake module directory

when including from there. Run "cmake --help-policy CMP0017" for policy

details. Use the cmake_policy command to set the policy and suppress
this

warning.

Call Stack (most recent call first):

C:/Program Files (x86)/CMake
2.8/share/cmake-2.8/Modules/FindZLIB.cmake:69 (INCLUDE)

src/CGALimageIO/CMakeLists.txt:16 (find_package)

This warning is for project developers. Use -Wno-dev to suppress it.

Found ZLIB: D:/winappl/zlib/lib/zdll.lib (found version "1.2.5")

OpenGL include:

OpenGL libraries: glu32;opengl32

USING ZLIB_VERSION = '1.2.5'

ZLib include: D:/winappl/zlib/include

ZLib libraries: D:/winappl/zlib/lib/zdll.lib

CMake Warning (dev) at C:/Program Files (x86)/CMake
2.8/share/cmake-2.8/Modules/FindPackageHandleStandardArgs.cmake:85
(INCLUDE):

File C:/Program Files (x86)/CMake

2.8/share/cmake-2.8/Modules/FindPackageHandleStandardArgs.cmake includes

D:/winappl/CGAL-3.8/cmake/modules/FindPackageMessage.cmake (found via

CMAKE_MODULE_PATH) which shadows C:/Program Files (x86)/CMake

2.8/share/cmake-2.8/Modules/FindPackageMessage.cmake. This may cause

errors later on .

Policy CMP0017 is not set: Prefer files from the CMake module directory

when including from there. Run "cmake --help-policy CMP0017" for policy

details. Use the cmake_policy command to set the policy and suppress
this

warning.

Call Stack (most recent call first):

C:/Program Files (x86)/CMake
2.8/share/cmake-2.8/Modules/FindQt4.cmake:357 (INCLUDE)

src/CGALQt4/CMakeLists.txt:18 (find_package)

This warning is for project developers. Use -Wno-dev to suppress it.

USING QT4_VERSION = '4.7.4'
...


CGAL_LIBRARY remained not set ( an empty text box)
6. pressed Generate

Is there anything I am doing wrong?

Many thanks and best regards
Petr

PS: I have put the output from cmake-gui and the resulting CMakeCache.txt in the attachment


Dne 3.10.2011 8:17, Sebastien Loriot (GeometryFactory) napsal(a):
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