XForms: XFORMS: Again on statical compilation

Vicentini Emanuele (vicentin@arena.sci.univr.it)
Thu, 25 Jun 1998 09:11:34 +0200 (MET DST)

# To subscribers of the xforms list from Vicentini Emanuele <vicentin@arena.sci.univr.it> :

Hi,
Speaking about a statical compilation, yesterday I downloaded the
a.out xforms from braggs. At home I tried to compile again a little stupid
program with a single button.
The first time I tried to compile with the elf library installed
on my home system with:

gcc -o sample sample_main.c sample.c -L/usr/X11/lib -lX11 -lm -lforms -static

All I got was lots of "undefined references" like

/usr/local/lib/libforms.a(button.o): In function `free_pixmap':
button.o(.text+0x26): undefined reference to `XFreePixmap'
/usr/local/lib/libforms.a(button.o): In function `wait_for_release':
button.o(.text+0x548): undefined reference to `XLookupKeysym'
button.o(.text+0x571): undefined reference to `XSync'
(they're too much to show here entirely... 437 lines).

The I tried with the just-downloaded a.out library:

gcc -o sample sample_main.c sample.c -L/usr/X11/lib -L. -lX11 -lm -lforms -static

I wrote "-L." just be sure to use the "right" forms library. I got only the
few undefined references reported below:

/tmp/cca002071.o: In function `main':
/tmp/cca002071.o(.text+0x15): undefined reference to `fl_initialize'
/tmp/cca002071.o(.text+0x39): undefined reference to `fl_show_form'
/tmp/cca002071.o(.text+0x41): undefined reference to `fl_do_forms'
/tmp/cca002072.o: In function `create_form_sample':
/tmp/cca002072.o(.text+0x22): undefined reference to `fl_bgn_form'
/tmp/cca002072.o(.text+0x46): undefined reference to `fl_add_box'
/tmp/cca002072.o(.text+0x65): undefined reference to `fl_add_button'
/tmp/cca002072.o(.text+0x72): undefined reference to `fl_end_form'

My home system is a Linux box with:
kernel 2.0.29
gcc 2.7.2.1
libc.so.5.4.23
libX11.so.6.1 (there's also a libX11.a, of course)
libm.so.5.0.8
libform.so.0.88 (0.88.1 actually)

I really don't know whatever I can do. Any comments?

Emanuele.

_________________________________________________
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://bragg.phys.uwm.edu/xforms
List Archive: http://bob.usuf2.usuhs.mil/mailserv/list-archives/