> > When I try to compile a C program using glpk functions, I get the the
> > following error at the linker. I've checked the include path and it
> > contains glpk.h and the lib contains libglpk. I'm compiling on a 64-bit
> > machine running ubuntu 11.10
> >
> > /tmp/ccPR8ZKY.o: In function `main':
> > scheduler_main.c:(.text+0x10): undefined reference to `glp_create_prob'
> > scheduler_main.c:(.text+0x2b): undefined reference to `glp_set_prob_name'
> 
> IIRC most of the GLPK function names are #defined to something else.

The names of all glpk api routines (i.e. prefixed by 'glp_') are not
redefined. Only names of internal routines, which have the global scope,
and names of obsolete api routines are redefined to be prefixed by
'_glp_' (to make the namespace clean).

> I suspect that you did not #include glpk.h
> and thus did not get the right names.
> Did you get any warnings about undeclared functions?
> 


_______________________________________________
Help-glpk mailing list
[email protected]
https://lists.gnu.org/mailman/listinfo/help-glpk

Reply via email to