Skip to Content.
Sympa Menu

cgal-discuss - Re: [cgal-discuss] LNK error 2019: while compiling application with CGAL

Subject: CGAL users discussion list

List archive

Re: [cgal-discuss] LNK error 2019: while compiling application with CGAL


Chronological Thread 
  • From: "Sebastien Loriot (GeometryFactory)" <>
  • To:
  • Subject: Re: [cgal-discuss] LNK error 2019: while compiling application with CGAL
  • Date: Fri, 18 Jan 2013 12:30:54 +0100
  • Organization: GeometryFactory

Maybe this page might help:

http://www.cgal.org/windows_installation.html

Sebastien.

On 01/17/2013 06:37 PM, thedorkknight wrote:
Hi,

i am trying to compile a delaunay triangulation application its simple file,
i am just trying to progress step by step.

i am using CGAL 4.1, QT4, VC++10,CMAKE

the steps which i followed are as follows -

1) I installed boost. Its installed correct, because it doesnt cause
problems when i install CGAL.
2) I installed CGAL in 32 bit.
3) I build CGAL using CMAKE, again i chose 32 bit VC++10 compiler. (first
configure and generate). This works fine.
4) I start VC++10. First I build CMAKE in debug, then in Release. again 32
bit selected. no problem here.

CGAL source folder = C:\libraries\CGAL
CGAL build folder = C:\libraries\CGAL\build

As mentioned before, i am using QT to develop.

following is the code.



#include<iostream>
#include<stdio.h>
#include<QFile>
#include<QString>
#include<QStringList>
#include<QTextStream>
#include<QIODevice>
#include<vector>
#include<list>
#include<CGAL/Exact_predicates_inexact_constructions_kernel.h>
#include<CGAL/Projection_traits_xy_3.h>
#include<CGAL/Delaunay_triangulation_3.h>




typedef CGAL::Exact_predicates_inexact_constructions_kernel k;
//typedef CGAL::Projection_traits_xy_3<k> gt;
typedef CGAL::Delaunay_triangulation_3<k> delaunay;
typedef delaunay::Point Point;

using namespace std;

int main()
{


//QStringList test;
//QString interm;
vector<Point> x,y,z;
list<Point> pcloud;

pcloud.push_back(Point(0,0,0));
pcloud.push_back(Point(0,1,1));
pcloud.push_back(Point(1,1,0));
pcloud.push_back(Point(0,2,1));
pcloud.push_back(Point(2,2,0));
pcloud.push_back(Point(0,3,1));
pcloud.push_back(Point(3,3,0));

delaunay t(pcloud.begin(), pcloud.end()); // line XX

return 0;
}

If i include the line XX only then error occurs. Its the same error, as
shown below.

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)
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)
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)
main.obj : error LNK2019: unresolved external symbol __imp____gmpq_add
referenced in function "public: class CGAL::Gmpq& __thiscall
CGAL::Gmpq::operator+=(class CGAL::Gmpq const&)"
(??YGmpq@CGAL@@QAEAAV01@ABV01@@Z)
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)
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)
libboost_thread-vc100-mt-1_51.lib(thread.obj) : error LNK2019: unresolved
external symbol "public: static class boost::chrono::time_point<class
boost::chrono::system_clock,class boost::chrono::duration<__int64,class
boost::ratio<1,10000000> > > __cdecl
boost::chrono::system_clock::now(void)"
(?now@system_clock@chrono@boost@@SA?AV?$time_point@Vsystem_clock@chrono@boost@@V?$duration@_JV?$ratio@$00$0JIJGIA@@boost@@@23@@23@XZ)
referenced in function "public: bool __thiscall
boost::thread::try_join_until(class boost::chrono::time_point<class
boost::chrono::system_clock,class boost::chrono::duration<__int64,class
boost::ratio<1,1000000000> > > const&)"
(?try_join_until@thread@boost@@QAE_NABV?$time_point@Vsystem_clock@chrono@boost@@V?$duration@_JV?$ratio@$00$0DLJKMKAA@@boost@@@23@@chrono@2@@Z)
release\dt_trial.exe : fatal error LNK1120: 8 unresolved externals
cl -c -nologo -Zm200 -Zc:wchar_t- -O2 -MD -GR -EHsc -W3 -w34100
-w34189
-DUNICODE -DWIN32 -DQT_LARGEFILE_SUPPORT -DQT_DLL -DQT_NO_DEBUG
-DQT_CORE_LIB -DQT_HAVE_MMX -DQT_HAVE_3DNOW -DQT_HAVE_SSE -DQT_HAVE_MMXEXT
-DQT_HAVE_SSE2 -DQT_THREAD_SUPPORT
-I"c:\QtSDK\Desktop\Qt\4.8.1\msvc2010\include\QtCore"
-I"c:\QtSDK\Desktop\Qt\4.8.1\msvc2010\include" -I"c:\libraries\CGAL\include"
-I"c:\libraries\boost_1_51" -I"c:\libraries\CGAL\build\include"
-I"c:\libraries\CGAL\auxiliary\gmp\include"
-I"c:\QtSDK\Desktop\Qt\4.8.1\msvc2010\include\ActiveQt" -I"release"
-I"c:\QtSDK\Desktop\Qt\4.8.1\msvc2010\mkspecs\win32-msvc2010" -Forelease\
@C:\Users\mojoking\AppData\Local\Temp\main.obj.7448.78.jom
link /LIBPATH:"c:\QtSDK\Desktop\Qt\4.8.1\msvc2010\lib" /NOLOGO
/DYNAMICBASE
/NXCOMPAT /INCREMENTAL:NO /SUBSYSTEM:CONSOLE
"/MANIFESTDEPENDENCY:type='win32' name='Microsoft.Windows.Common-Controls'
version='6.0.0.0' publicKeyToken='6595b64144ccf1df' language='*'
processorArchitecture='*'" /MANIFEST
/MANIFESTFILE:"release\dt_trial.intermediate.manifest"
/OUT:release\dt_trial.exe
@C:\Users\mojoking\AppData\Local\Temp\dt_trial.exe.7448.13010.jom
C:\QtSDK\QtCreator\bin\jom.exe -f Makefile.Release


Following are my configuration flags -

QT += core

QT -= gui

TARGET = dt_trial
CONFIG += console
CONFIG -= app_bundle

TEMPLATE = app

INCLUDEPATH += C:\\libraries\\CGAL\\include
INCLUDEPATH += C:\\libraries\\boost_1_51
INCLUDEPATH += C:\\libraries\\CGAL\\build\\include
INCLUDEPATH += C:\\libraries\\CGAL\\auxiliary\\gmp\\include

LIBS += -LC:\\libraries\\boost_1_51\\lib
LIBS += -LC:\\libraries\\CGAL\\build\\lib
LIBS += -LC:\\libraries\\CGAL\\auxiliary\\gmp\\lib


SOURCES += main.cpp


I am new to QT, and in a way also new to c++, the last time i used it was
when it still had a blue screen.

Any help will be appreciated. Many thanks.

thedorkknight









--
View this message in context:
http://cgal-discuss.949826.n4.nabble.com/LNK-error-2019-while-compiling-application-with-CGAL-tp4656492.html
Sent from the cgal-discuss mailing list archive at Nabble.com.





Archive powered by MHonArc 2.6.18.

Top of Page