[gecode-users] linking under windows when using a propagator object such as Set::Int::Card

Grégoire Dooms dooms at info.ucl.ac.be
Thu Nov 24 16:23:48 CET 2005


Hello,
We know this is not pure gecode related matter (more like C++ compiling 
under windows) but we tought you would know the answer.

We have this linking problem under windows:
We use Set::Int::Card::post in one of our propagators. This links fine 
under linux but fails to do so under windows. The error is attached below.

The source code (contribs/map/matching/mono.icc inluded by 
contribs/map/matching/mono.hh) contains an #include "set/int.hh".
In set/int.hh the propagators are not declared to be exported. And if we 
link with int.obj, then we cannot link with GecodeSet.lib (symbol 
defined twice).
What is the right way do do it ?

There is also a link error on using include or exclude on a SetView. Do 
you have an hint on how to solve it ?

Best,
--
Grégoire Dooms
-------------- next part --------------
cl -o examples/approximateMatching.exe examples/approximateMatching.obj ../../examples/support.obj ../../examples/timer.
obj  -I. -I. -nologo -EHsc -Ox -G7  -Ic:\cygwin\usr\include\boost-1_33 -L../../ -I../../ -I../graph -L../graph   -Ic:\cy
gwin\usr\include\boost-1_33 -L../../ -I../../ -I../graph -L../graph  -lgecodegraph\
 ../../GecodeMinimodel.lib ../../GecodeSet.lib ../../GecodeInt.lib ../../GecodeSearch.lib ../../GecodeKernel.lib ../grap
h/Gecodegraph.lib Gecodemap.lib ../graph/Gecodegraph.lib
cl : Command line warning D4002 : ignoring unknown option '-L../../'
cl : Command line warning D4002 : ignoring unknown option '-L../graph'
cl : Command line warning D4002 : ignoring unknown option '-L../../'
cl : Command line warning D4002 : ignoring unknown option '-L../graph'
cl : Command line warning D4002 : ignoring unknown option '-lgecodegraph'
approximateMatching.obj : error LNK2019: unresolved external symbol "private: bool __thiscall Gecode::Set::LUBndSet::exc
lude_full(class Gecode::Space *,int,int)" (?exclude_full at LUBndSet@Set at Gecode@@AAE_NPAVSpace at 3@HH at Z) referenced in functi
on "public: bool __thiscall Gecode::Set::LUBndSet::exclude(class Gecode::Space *,int,int)" (?exclude at LUBndSet@Set at Gecode
@@QAE_NPAVSpace at 3@HH at Z)
approximateMatching.obj : error LNK2019: unresolved external symbol "private: bool __thiscall Gecode::Set::GLBndSet::inc
lude_full(class Gecode::Space *,int,int)" (?include_full at GLBndSet@Set at Gecode@@AAE_NPAVSpace at 3@HH at Z) referenced in functi
on "public: bool __thiscall Gecode::Set::GLBndSet::include(class Gecode::Space *,int,int)" (?include at GLBndSet@Set at Gecode
@@QAE_NPAVSpace at 3@HH at Z)
approximateMatching.obj : error LNK2019: unresolved external symbol "public: static enum Gecode::ExecStatus __cdecl Geco
de::Set::Int::Card::post(class Gecode::Space *,class Gecode::Set::SetView,class Gecode::Int::IntView)" (?post at Card@Int at S
et at Gecode@@SA?AW4ExecStatus at 4@PAVSpace at 4@VSetView at 34@VIntView at 24@@Z) referenced in function "void __cdecl Gecode::mono<s
truct Gecode::Graph::OutAdjSetsGraphView>(class Gecode::Space *,struct Gecode::Graph::OutAdjSetsGraphView,struct Gecode:
:Graph::OutAdjSetsGraphView,class Gecode::Map::MapVar)" (??$mono at UOutAdjSetsGraphView@Graph at Gecode@@@Gecode@@YAXPAVSpace
@0 at UOutAdjSetsGraphView@Graph at 0@1VMapVar at Map@0@@Z)
examples/approximateMatching.exe : fatal error LNK1120: 3 unresolved externals
make[1]: *** [examples/approximateMatching.exe] Error 2
make[1]: Leaving directory `/home/Administrator/gecode/contribs/map'
make: *** [compilesubdirs] Error 2


More information about the gecode-users mailing list