Under visual studio add:<div>LEMON_ONLY_TEMPLATES into the preprocessor field.</div><div><br></div><div>If you using cmake based build you could add the following line directly into your cmake<br><div>ADD_DEFINITIONS(-DLEMON_ONLY_TEMPLATES)</div>
<div><br><div class="gmail_quote">2012/8/1 Alpár Jüttner <span dir="ltr"><<a href="mailto:alpar@cs.elte.hu" target="_blank">alpar@cs.elte.hu</a>></span><br><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">
Hi,<br>
<div class="im"><br>
> I get a link error and would be most grateful for a tip to fix it<br>
</div><div class="im">> I use Visual Studio C++ 2010. I believe all directories are specified<br>
> correctly to point to the correct folders containing LEMON libraries.<br>
> LEMON compiled without error.<br>
><br>
> Issue has to do with the INVALID symbol in lemon:<br>
><br>
> 1>CompareGpuToGraphCoverSpaceWorker.obj : error LNK2001: unresolved<br>
> external symbol "struct lemon::Invalid const<br>
> lemon::INVALID" (?INVALID@lemon@@3UInvalid@1@B)<br>
<br>
</div>You need to _link_ the lemon library to your code during the<br>
compilation. There are several alternative ways of doing it:<br>
<br>
* Use the CMAKE build system for your projects. It is highly<br>
recommended, for it is be very handy for larger project, and it<br>
is a platform independent solution platform solution. See<br>
<a href="http://lemon.cs.elte.hu/trac/lemon/wiki/HowToCompile" target="_blank">http://lemon.cs.elte.hu/trac/lemon/wiki/HowToCompile</a> for more<br>
details.<br>
* Build and install LEMON, then set the lemon library by hand to<br>
the compiler. The library is named lemon.lib on Windows.<br>
* INVALID is declared in lemon/base.cc. You can copy it to your<br>
project and compile it along with your own files. Note that this<br>
is quite cumbersome. The using CMAKE recommended above does<br>
exactly the same but in a much more sophisticated and<br>
comfortable way.<br>
* It is possible to use LEMON as a header only library, then you<br>
don't need to link it to lemon.lib. (At the cost that some parts<br>
will such as the LP/MIP interface of the EPS export will not<br>
work). For this you have to define LEMON_ONLY_TEMPLATES during<br>
the compilation. Sorry, but I don't know how to do it with VS.<br>
Using gcc it is done with the -DLEMON_ONLY_TEMPLATES compiler<br>
switch.<br>
<br>
Regards,<br>
Alpar<br>
<div class="im HOEnZb"><br>
><br>
> 1>C:\VSProjects\SPU\x64\Debug\SPU.exe : fatal error LNK1120: 1<br>
> unresolved externals<br>
><br>
><br>
><br>
> Any recommendations?<br>
><br>
><br>
><br>
> Thanks for the help.<br>
><br>
><br>
><br>
> Best Regards,<br>
><br>
><br>
><br>
> George Shannon<br>
><br>
> PhD Candidate<br>
><br>
><br>
</div><div class="HOEnZb"><div class="h5">> _______________________________________________<br>
> Lemon-user mailing list<br>
> <a href="mailto:Lemon-user@lemon.cs.elte.hu">Lemon-user@lemon.cs.elte.hu</a><br>
> <a href="http://lemon.cs.elte.hu/mailman/listinfo/lemon-user" target="_blank">http://lemon.cs.elte.hu/mailman/listinfo/lemon-user</a><br>
<br>
<br>
_______________________________________________<br>
Lemon-user mailing list<br>
<a href="mailto:Lemon-user@lemon.cs.elte.hu">Lemon-user@lemon.cs.elte.hu</a><br>
<a href="http://lemon.cs.elte.hu/mailman/listinfo/lemon-user" target="_blank">http://lemon.cs.elte.hu/mailman/listinfo/lemon-user</a><br>
</div></div></blockquote></div><br><br clear="all"><div><br></div>-- <br><div><font>Regards/Cordialement,</font></div><div><font>Pierre M</font></div><br>
</div></div>