Subject: CGAL users discussion list
List archive
- From: YS Wong <>
- To: "" <>
- Subject: [cgal-discuss] Gmp link error , CGAL 3.9, VS2010, boost 1.47, Qt 4.8
- Date: Mon, 30 Jan 2012 23:14:53 +0800
Hi
I'm encountering link problem when I try to compile the hello world example with CGAL 3.9, boost 1.47, qt4.8,and VS2010 on Win7 64bit
the error messge is:
1>main.obj : error LNK2019: unresolved external symbol __imp____gmpz_clear referenced in function "public: __thiscall CORE::BigIntRep::~BigIntRep(void)" (??1BigIntRep@CORE@@QAE@XZ)
I try to use two Preprocessor definition, CGAL_NO_AUTOLINK_MPFR and CGAL_NO_AUTOLINK_GMP, to avoid the lack gmp-vc100-mt-gd.lib error
However, the VS2010 still cannot link Gmp properly.
My VS2010 project setting and error message are listed below, my platform is win7 64bit, and the attached file is the log of CMake
Anyone know how to solve this problem ?
Thank for your time and help.
project property-> link -> General

project property-> link -> Input

project property -> C++ -> additional include deirectories

ManifestResourceCompile:
1> All outputs are up-to-date.
1>main.obj : error LNK2019: unresolved external symbol __imp____gmpz_clear referenced in function "public: __thiscall CORE::BigIntRep::~BigIntRep(void)" (??1BigIntRep@CORE@@QAE@XZ)
1>CGAL-vc100-mt-gd.lib(all_files.obj) : error LNK2001: unresolved external symbol __imp____gmpz_clear
1>main.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)
1>main.obj : error LNK2019: unresolved external symbol __imp____gmpq_set_d referenced in function "public: __thiscall CGAL::Gmpq::Gmpq(double)" (??0Gmpq@CGAL@@QAE@N@Z)
1>main.obj : error LNK2019: unresolved external symbol __imp____gmpq_init referenced in function "public: __thiscall CGAL::Gmpq_rep::Gmpq_rep(void)" (??0Gmpq_rep@CGAL@@QAE@XZ)
1>main.obj : error LNK2019: unresolved external symbol __imp____gmpq_sub referenced in function "public: class CGAL::Gmpq & __thiscall CGAL::Gmpq::operator-=(class CGAL::Gmpq const &)" (??ZGmpq@CGAL@@QAEAAV01@ABV01@@Z)
1>main.obj : error LNK2019: unresolved external symbol __imp____gmpq_mul referenced in function "public: class CGAL::Gmpq & __thiscall CGAL::Gmpq::operator*=(class CGAL::Gmpq const &)" (??XGmpq@CGAL@@QAEAAV01@ABV01@@Z)
1>main.obj : error LNK2019: unresolved external symbol __imp____gmpq_equal referenced in function "public: bool __thiscall CGAL::Gmpq::operator==(class CGAL::Gmpq const &)const " (??8Gmpq@CGAL@@QBE_NABV01@@Z)
1>main.obj : error LNK2019: unresolved external symbol __imp____gmpq_cmp referenced in function "public: bool __thiscall CGAL::Gmpq::operator<(class CGAL::Gmpq const &)const " (??MGmpq@CGAL@@QBE_NABV01@@Z)
1>C:\Users\Tius\Documents\Visual Studio 2010\Projects\cgal0\Debug\cgal0.exe : fatal error LNK1120: 8 unresolved externals
1>
1>Build FAILED.
1>
Best regards,
Tius Wong
Build CGAL from release: CGAL-3.9
Packagenames: CGAL-3.9
CGAL_MAJOR_VERSION=3
CGAL_MINOR_VERSION=9
CGAL_BUGFIX_VERSION=
CGAL_SONAME_VERSION=8
CGAL_SOVERSION =8.0.0
CGAL_REFERENCE_CACHE_DIR=
Building static libraries
Targetting Visual Studio 10
Target build enviroment supports auto-linking
Using VC10 compiler.
Generator uses intermediate configuration directory: $(Configuration)
USING CMake version: 2.8.6
System: Windows
Build type: Release
USING CXXFLAGS = ' /DWIN32 /D_WINDOWS /W3 /Zm1000 /EHsc /GR
-D_CRT_SECURE_NO_DEPRECATE -D_SCL_SECURE_NO_DEPRECATE
-D_CRT_SECURE_NO_WARNINGS -D_SCL_SECURE_NO_WARNINGS /fp:strict /fp:except-
/MD /O2 /Ob2 /D NDEBUG'
USING LDFLAGS = ' '
GMP include: C:/Program Files/CGAL-3.9/auxiliary/gmp/include
GMP libraries: C:/Program Files/CGAL-3.9/auxiliary/gmp/lib/libgmp-10.lib
GMP definitions:
USING GMP_VERSION = '5.0.1'
MPFR include: C:/Program Files/CGAL-3.9/auxiliary/gmp/include
MPFR libraries: C:/Program Files/CGAL-3.9/auxiliary/gmp/lib/libmpfr-4.lib
MPFR definitions:
USING MPFR_VERSION = '3.0.0'
Boost include: C:/boost/boost_1_47
Boost libraries:
optimized;C:/boost/boost_1_47/lib/libboost_thread-vc100-mt-1_47.lib;debug;C:/boost/boost_1_47/lib/libboost_thread-vc100-mt-gd-1_47.lib
Boost definitions:
USING BOOST_VERSION = '1.47.0'
Library config detected: Core
Library config detected: ImageIO
Could NOT find ZLIB (missing: ZLIB_LIBRARY ZLIB_INCLUDE_DIR)
OpenGL include:
OpenGL libraries: glu32;opengl32
NOTICE: CGAL_ImageIO needs ZLib to read compressed files. That feature will
not be activated.
Library config detected: Qt3
Library config detected: Qt4
USING QT4_VERSION = '4.8.0'
OpenGL include:
OpenGL libraries: glu32;opengl32
OpenGL definitions:
Qt4 include: C:/Qt/4.8.0/include
Qt4 libraries:
optimized;C:/Qt/4.8.0/lib/qtmain.lib;debug;C:/Qt/4.8.0/lib/qtmaind.lib;optimized;C:/Qt/4.8.0/lib/QtOpenGL4.lib;debug;C:/Qt/4.8.0/lib/QtOpenGLd4.lib;optimized;C:/Qt/4.8.0/lib/QtGui4.lib;debug;C:/Qt/4.8.0/lib/QtGuid4.lib;optimized;C:/Qt/4.8.0/lib/QtCore4.lib;debug;C:/Qt/4.8.0/lib/QtCored4.lib
Qt4 definitions: -DQT_DLL
moc executable: C:/Qt/4.8.0/bin/moc.exe
uic executable: C:/Qt/4.8.0/bin/uic.exe
Library configs detected: CGAL;Core;ImageIO;Qt3;Qt4
Configuring done
Generating done
- [cgal-discuss] Gmp link error , CGAL 3.9, VS2010, boost 1.47, Qt 4.8, YS Wong, 01/30/2012
Archive powered by MHonArc 2.6.16.