[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: [Help-glpk] C++ links, again ;-)
From: |
Paulo Jorge Matos |
Subject: |
Re: [Help-glpk] C++ links, again ;-) |
Date: |
Wed, 30 Nov 2005 08:45:46 +0000 |
On 28/11/05, Antonello Lobianco <address@hidden> wrote:
> hello all,
> I'm quite new on C/C++ programming..
> 'just trying to make a test C++ program working with glpk.
>
> Yes, I read the doc and searched the mailing list..
>
> I just added this two lines:
> LPX *lp;
> lp = lpx_create_prob();
>
> If I don't place any header I get the error:
>
> error: 'LPX' was not declared in this scope
> error: 'lp' was not declared in this scope
> error: 'lpx_create_prob' was not declared in this scope
>
>
> But even if I place at the top of the header:
>
> extern "C" {
> #include "glpk.h"
> }
>
Yes, you need to include this.
> I still got the error:
> undefined reference to `glp_lpx_create_prob'
>
I imagine this error comes from the linker and not the compiler, have
you linked agained libglpk? with the -lglpk flag?
Cheers,
Paulo Matos
> Where am I wrong?
> Using kdevelop on Linux
>
> (but that's the same just using g++ command line, while with gcc is
> working..)
>
>
>
> _______________________________________________
> Help-glpk mailing list
> address@hidden
> http://lists.gnu.org/mailman/listinfo/help-glpk
>
--
Paulo Jorge Matos - pocm at sat inesc-id pt
Web: http://sat.inesc-id.pt/~pocm
Computer and Software Engineering
INESC-ID - SAT Group