Re: XForms: Its not an elf problem.

Steve Lamont (spl@szechuan.ucsd.edu)
Thu, 22 Jan 98 19:33:42 PST

To subscribers of the xforms list from spl@szechuan.ucsd.edu (Steve Lamont) :

> I am runing linux 2.0.33 and I try to compile and I get thease errors.
>
> bash# gcc test.c
> /tmp/cca019551.o: In function `main':
> /tmp/cca019551.o(.text+0x15): undefined reference to `fl_initialize'

> ... I am runing gcc version 2.7.2.3,. Is there a compiler
> switch or something else I am missing?

If that's the *exact* line you typed, yes, there is. The problem is
that you haven't told the compiler what libraries, beyond libc.a, that
it needs to use. Try:

gcc text.c -lforms -lX11 -lm

This will tell the loader to search libforms.a, libX11.a, and libm.a
for external references.

That should produce an executable.

Refer to the manual page for your compiler (gcc) and/or loader (ld)
for further details.

spl
_________________________________________________
To unsubscribe, send the message "unsubscribe" to
xforms-request@bob.usuf2.usuhs.mil or see
http://bob.usuf2.usuhs.mil/mailserv/xforms.html
Xforms Home Page: http://bloch.phys.uwm.edu/xforms
List Archive: http://bob.usuf2.usuhs.mil/mailserv/list-archives/