[Lemon-user] Linking error - Visual Studio 2008

Kovács Péter kpeter at inf.elte.hu
Tue Mar 16 07:58:56 CET 2010


Dear Laszlo,

Didn't you forget to add the GLPK library to the dependencies? If you can compile a LEMON code without using LP tools (e.g. hello_lemon.cc, see http://lemon.cs.elte.hu/pub/tutorial/sec_hello_lemon.html), then the problem is probably around the GLPK dependencies.

Regards,
Peter

> Dear All,
> 
> First of all, i'm a newbie lemon user.
> First, i would like to solve LP problems with it. I choosed GLPK. After 
> including the header files, and added the "lemon.lib" to the 
> dependencies, i tried to compile the following lines:
> 
> #include "glpk.h"
> 
> using namespace lemon;
> 
> int main () {
> GlpkMip mip;
> return 0;
> 
> }
> 
> I'm getting the following error message:
> "1>Compiling...
> 1>glpk.cpp
> 1>Linking...
> 1>glpk.obj : error LNK2019: unresolved external symbol "public: 
> __thiscall lemon::GlpkMip::GlpkMip(void)" (??0GlpkMip at lemon@@QAE at XZ) 
> referenced in function _main
> 1>glpk.obj : error LNK2019: unresolved external symbol "protected: 
> virtual __thiscall lemon::GlpkBase::~GlpkBase(void)" 
> (??1GlpkBase at lemon@@MAE at XZ) referenced in function "public: virtual 
> __thiscall lemon::GlpkMip::~GlpkMip(void)" (??1GlpkMip at lemon@@UAE at XZ)"
> 
> Have somebody any idea what can occur this error message? (i already 
> googled it, and it came out, that there is maybe a lib error, but i 
> added the lemon.lib to the project)
> 
> Thanks in advance,
> Laszlo
> 



More information about the Lemon-user mailing list