help-glpk
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[Help-glpk] Re: How to link with MS VC++ 6.0?


From: Andrew Makhorin
Subject: [Help-glpk] Re: How to link with MS VC++ 6.0?
Date: Sat, 15 Nov 2003 20:38:31 +0300

>I'm having some problems to link any program with glpk.
>I'm using Win2000 Sp4 and MS VC++ 6.0 Sp5.
>I've added the glpk.lib to the project settings, the compilation is
> without erros, but the link isn't.
>This is the errors:
>
>--------------------Configuration: Test - Win32 Debug--------------------
>Linking...
>sample.obj : error LNK2001: unresolved external symbol "void __cdecl
> glp_lpx_delete_prob(struct LPX *)" (?glp_lpx_delete_prob@@YAXPAULPX@@@Z)
>sample.obj : error LNK2001: unresolved external symbol "int __cdecl
> glp_lpx_print_mip(struct LPX *,char *)" 
> (?glp_lpx_print_mip@@YAHPAULPX@@address@hidden)

External names are mangled. Probably your program is in C++, not in C.

If your program is in C, you should change settings in ide to tell the
compiler about that, or use the extension '.c' rather than '.cpp'.

If your program is in C++, you should use the following construction:

extern "C" {
#include "glpk.h"
}

because all glpk headers are written in C, not in C++.






reply via email to

[Prev in Thread] Current Thread [Next in Thread]