Re: [gtk-list] Re: again with GTK static linking
- From: Drazen Kacar <dave srce hr>
- To: gtk-list redhat com
- Subject: Re: [gtk-list] Re: again with GTK static linking
- Date: Fri, 7 Jan 2000 18:36:54 +0100
Owen Taylor wrote:
>
> "Rostedt, Steven" <steven.rostedt@lmco.com> writes:
> > Here's my problem.
> >
> > I compile with:
> >
> > gcc -o mytool mytool.o -L/opt/local/lib -L/usr/openwin/lib \
> > -Wl,-Bstatic -lgtk -lgdk -lglib -lgmodule -Wl,-Bdynamic \
> > -lXext -lX11 -lm
> >
> > And I receive the following errors:
> >
> > Undefined first referenced
> > symbol in file
> > dlclose /opt/local/lib/libgmodule.a(gmodule.o)
> > (symbol belongs to implicit dependency /usr/lib/libdl.so.1)
> > dlsym /opt/local/lib/libgmodule.a(gmodule.o)
> > (symbol belongs to implicit dependency /usr/lib/libdl.so.1)
> > dlopen /opt/local/lib/libgmodule.a(gmodule.o)
> > (symbol belongs to implicit dependency /usr/lib/libdl.so.1)
> > dlerror /opt/local/lib/libgmodule.a(gmodule.o)
> > (symbol belongs to implicit dependency /usr/lib/libdl.so.1)
> > ld: fatal: Symbol referencing errors. No output written to mytool
>
> Your problem is that Solaris doesn't allow dynamic loading from
> a statically linkend executable.
That's partially correct. Solaris doesn't allow dynamic loading from a
statically linked executable, but he is not trying to make that kind of
executable. He only wants to link in GTK libs statically. Adding -ldl
at the end of linking invocation above should do the trick.
Things might look a bit awkward, but it should work.
--
.-. .-. I don't work for my employer.
(_ \ / _)
| dave@srce.hr
| dave@fly.srk.fer.hr
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]