Re: XForms: VERY strange seg faults on fl_initialize()

T.C. Zhao (tc_zhao@yahoo.com)
Sat, 13 Nov 1999 23:00:52 -0800 (PST)

# To subscribers of the xforms list from "T.C. Zhao" <tc_zhao@yahoo.com> :

you must use the correct order
gcc -I/.... AgentFoo.cpp -L.....
i.e., all the .o files that call a library functions must
go *before* the library. The same is true for libraries as well,
i.e., if libA depends on libB, you need to specify
A before B. The linker is pretty stupid in this regard.

--- "Todd C. Zino" <todd@lacemaker.com> wrote:
> # To subscribers of the xforms list from "Todd C. Zino"
> <todd@lacemaker.com> :
>
> >I wonder if you have the right version of XForms for your system's
> >libc. This is the usual cause for gastric distress of this sort.
> >BTW, I'd link with
> >
> > gcc -g -I/home/todd/xforms/FORMS -L/usr/X11R6/lib \
> > /home/tcz3/xforms/FORMS/libforms.a -lX11 -lXpm -lm \
> > AgentFoo.cpp
>
> Just for kicks, I downloaded both .88 and .89 versions for glibc2.1
> (I'm
> using a redhat 6.0 machine with /lib/libc.so.2.1.1). When I compile
> as you
> suggest, I get this during the linking phase:
>
> /tmp/ccFDmkqr.o: In function 'main':
> /home/todd/src/.../AgentFoo.cpp:13: undefined reference to
> 'fl_initialize'.
>
> The exact compile string is
>
> gcc -g -I/home/todd/xforms882.1/xforms/FORMS -L/usr/X11R6/lib
> /home/todd/xforms882.1/xforms/FORMS/libforms.a -lX11 -lXpm -lm
> AgentFoo.cpp
>
> The same thing happens when I try
>
> gcc -g -I/home/todd/xforms882.1/xforms/FORMS
> -L/home/todd/xforms882.1/xforms/FORMS -lforms AgentFoo.cpp
>
> Keep in mind that this was compiling correctly when the stuff was in
> a
> different order, although I got the crash. I'm at a loss for what
> nuances
> cause these sort of errors. This is a fresh redhat 6.0 system I'm
> working
> on, and I've not tinkered with any of the libcs or Xlibs...
>
>
> +--------------------------------------------------------------+
> | Todd C. Zino todd@lacemaker.com |
> +--------------------------------------------------------------+
> _________________________________________________
> To unsubscribe, send the message "unsubscribe" to
> xforms-request@bob.usuhs.mil or see
> http://bob.usuhs.mil/mailserv/xforms.html
> XForms Home Page: http://bragg.phys.uwm.edu/xforms
> List Archive: http://bob.usuhs.mil/mailserv/list-archives/
>
>

=====

__________________________________________________
Do You Yahoo!?
Bid and sell for free at http://auctions.yahoo.com
_________________________________________________
To unsubscribe, send the message "unsubscribe" to
xforms-request@bob.usuhs.mil or see
http://bob.usuhs.mil/mailserv/xforms.html
XForms Home Page: http://bragg.phys.uwm.edu/xforms
List Archive: http://bob.usuhs.mil/mailserv/list-archives/