Path: utzoo!utgpu!jarvis.csri.toronto.edu!rutgers!mailrus!cornell!uw-beaver!rice!sun-spots-request From: duttnph!robert@nluug.nl (Robert de Vries) Newsgroups: comp.sys.sun Subject: Shared library problems Keywords: Software Message-ID: <723@dutrun.UUCP> Date: 17 May 89 13:05:04 GMT Sender: usenet@rice.edu Organization: Delft University of Technology, The Netherlands Lines: 20 Approved: Sun-Spots@rice.edu X-Sun-Spots-Digest: Volume 7, Issue 300, message 10 of 15 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.