Re: XForms: XFORMS: Again on statical compilation

Eef Hartman (E.J.M.Hartman@math.tudelft.nl)
Thu, 25 Jun 1998 12:00:55 +0200 (METDST)

# To subscribers of the xforms list from Eef Hartman <E.J.M.Hartman@math.tudelft.nl> :

In a message to me Vicentini Emanuele wrote:
> gcc -o sample sample_main.c sample.c -L/usr/X11/lib -lX11 -lm -lforms -static

A) the order is wrong of the libraries: forms USES X11 and m, so should be
before them on the command line: -lforms -lX11 -lm

> /usr/local/lib/libforms.a(button.o): In function `free_pixmap':

B) this one needs "pixmap" support, so you need -lforms -lxmp (or is it
Xpm?) and THEN the other (system) libraries.

> button.o(.text+0x548): undefined reference to `XLookupKeysym'
> button.o(.text+0x571): undefined reference to `XSync'

Entries in X11, aren't searched anymore as the "X11 processing" has already
been done when "-lforms" is done (and "forms" asks for them, so X11 has always
to be after forms). For dynamic (.so) libraries the order is much less
critical as the real binding is done RUN-time, not link time, but static
linked programs really need to find all the routines NOW.
And thus the libraries DO need to be specified in the right order.

> /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'

Now he can't find "libforms.*" anymore. These entries are in there.
Maybe the "wrong" type of forms library for your system.

-- 
    \     /   /
   /#. # #-  #  /
  ## ## ## ##  ##
 # #   ## ##  ##
" "  #    ## ##
"."  ".   "./
TTTTTTTTTT  UU      UU    Eef Hartman, System Administrator
    TT      UU      UU
    TT      UU      UU    Delft University of Technology
    TT      UU      UU    Mathematics (Applied Analysis) dept.
    TT      UU      UU    Mekelweg 4, P.O. Box 5031
    TT      UU      UU    2600 GA  Delft, The Netherlands
    TT       UU    UU     e-mail : E.J.M.Hartman@math.tudelft.nl
    TT        UUUUUU      fax    : +31-15-278 7209
_________________________________________________
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/