Shared library problems

Robert de Vries duttnph!robert at nluug.nl
Wed May 17 23:05:04 AEST 1989


I am trying to convert the X libraries (X11, Xaw, Xt, Xmu, oldX) to shared
libs.  I have faithfully removed any global initialized variables from the
sources and put them in separate modules which went into the .sa part of
the library.  What is the problem:

ld seems to miss globals which are only referenced in the library itself.
Therefore I get a message 'ld.so: __qfree not found' when I start a
program compiled with -lX11.

When I link the executable using a command like:

cc -o exec exec.o /usr/lib/libX11.so.1.0 /usr/lib/libX11.sa.1.0

everything works fine.  When I exchange the last two files the program
aborts with the message above.  I figured that when I could create a
reference to _qfree linking would go fine.  Is this the solution? Or must
I forget the _qfree and not put it in the .sa file because it will never
be referenced outside the X library?  Or even better: concatenate all the
files referencing _qfree, make _qfree local, and put the whole bunch into
a .so file.



More information about the Comp.sys.sun mailing list