help-glpk
[Top][All Lists]
Advanced

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

Re: [Help-glpk] Build Error


From: Andrew Makhorin
Subject: Re: [Help-glpk] Build Error
Date: Wed, 8 Nov 2006 16:06:02 +0300

> Thanks for the help. I finally figured it out after watching the
> output of the Makefile. The proper command to compile is:
> 
> gcc  -I. -I../include -c  glpsol.c
> gcc  -g -O2  -o glpsol  glpsol.o ../src/libglpk.a -lm
> 
> The original output from the makefile was:
> gcc -DPACKAGE=\"GLPK\" -DVERSION=\"4.9\" -DHAVE_LIBM=1
> -DSTDC_HEADERS=1 -I. -I. -I../include -g -O2 -c glpsol.c
> gcc  -g -O2  -o glpsol  glpsol.o ../src/libglpk.a -lm
> 
> I'm not sure why you have to do it this way exactly. Using the line
> of code you gave me produces the output that follows. Any idea why?

You need to be more familiar with basic development tools.

Undefined references to sqrt, log, etc, means that the math library
is not available to the linker.

> What does the -lm option do?

It makes libm.a, the math library, available to the linker.

FYI: The most recent version of glpk is 4.11.





reply via email to

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