Subject: CGAL users discussion list
List archive
- From: "Lars \"K-man\" Kristensson" <>
- To: <>
- Subject: Linking error...
- Date: Fri, 23 Feb 2007 23:49:45 +0100
Hi!
I'm sorry to bother you all about this problem, but I can't seem to find any
other source of help to solve this issue.
I, together with some experienced programmers, have just launched a major
open-source game project.
Since we have quite high ambitions about the project and its lifetime I
figured it might be a good idea to adapt to the CGAL type standard, while at
the same time making good use of the LGPL parts of this library.
I have now started some initial experiments with this library, to see how it
works. (Intending to build a dll for Constrained Delaunay Triangulations as
experiment.)
After figuring out the types and doing some minor changes to basic.h [0] I
managed to get the first code to compile.
Problems started when I called my first real function; intersection(...)
I keep receiving linking errors complaining about 'assertion_fail' and
'precondition_fail' [1].
I've double-checked all my lib-paths in the linker-settings [2]. I've tried
to change the paths as well as the placement of the directories on disc.
I've been searching the net for similar problems. I've been browsing the
manual and install-instructions hoping for some hints.
I've tried to re-compile CGAL.lib with different settings, and I even tried
to move it to my default lib-directory under MSVC2k5, making sure there was
no errors in the file or path-settings to it.
But since the linking keeps failing I must have missed something.
Anyone having a good idea on where or what to check next?
Kind regards
/Lars "K-man" K.
[0] - Changes in basic.h:
// EXCLUDES:
#define CGAL_NO_OSTREAM_INSERT_POINT_2
#define CGAL_NO_ISTREAM_EXTRACT_POINT_2
// Those defines are now allowed!
#ifdef min
#undef min
#endif // min
#ifdef max
#undef max
#endif // max
[1] - The output:
Delaunay.obj : error LNK2019: unresolved external symbol "void __cdecl
CGAL::assertion_fail(char const *,char const *,int,char const *)"
(?assertion_fail@CGAL@@YAXPBD0H0@Z)
referenced in function "bool __cdecl
CGAL::CGALi::do_intersect<struct CGAL::Cartesian<float> >(class
CGAL::Segment_2<struct CGAL::Cartesian<float> > const &,class
CGAL::Segment_2<struct CGAL::Cartesian<float> > const &,struct
CGAL::Cartesian<float> const &)"
(??$do_intersect@U?$Cartesian@M@CGAL@@@CGALi@CGAL@@YA_NABV?$Segment_2@U?$Car
tesian@M@CGAL@@@1@0ABU?$Cartesian@M@1@@Z)
Delaunay.obj : error LNK2019: unresolved external symbol "void __cdecl
CGAL::precondition_fail(char const *,char const *,int,char const *)"
(?precondition_fail@CGAL@@YAXPBD0H0@Z)
referenced in function "bool __cdecl
CGAL::CGALi::construct_if_finite<struct CGAL::Cartesian<float> const ,class
CGAL::Point_2<struct CGAL::Cartesian<float> >,float>(class
CGAL::Point_2<struct CGAL::Cartesian<float> > &,float,float,float,struct
CGAL::Cartesian<float> const &,class CGAL::Cartesian_tag const &)"
(??$construct_if_finite@$$CBU?$Cartesian@M@CGAL@@V?$Point_2@U?$Cartesian@M@C
GAL@@@2@M@CGALi@CGAL@@YA_NAAV?$Point_2@U?$Cartesian@M@CGAL@@@1@MMMABU?$Carte
sian@M@1@ABVCartesian_tag@1@@Z)
[2] - Using Microsoft Visual Studio 2005 SP1
- Linking error..., Lars \"K-man\" Kristensson, 02/24/2007
Archive powered by MHonArc 2.6.16.