Re: problem linking

Holger Veit (Holger.Veit@gmd.de)
Thu, 3 Apr 1997 19:56:39 +0200 (MET DST)

To subscribers of the xforms list from Holger.Veit@gmd.de (Holger Veit) :

> Finally, if you link dynamically with the XForms library the Xpm
> library is built in. For reasons that I don't recall, the Xpm stuff
> is not in the static version of the library. TC, want to remind me
> why this is so?

I am not TC, but I have asked myself the same question when I adapted XForms
to XFree86/OS2. The reason is: To avoid multiple references, or get the
wrong code linked in when attempting to build an application that needs
both Xpm and XForms. With a shared library, references to Xpm functions used
internally are not exported (provided the shared lib has been linked
correctly!).
This will allow you to use XForms with its used xpm-3.4g together with some
foreign Xpm library without any clash.

A static library is an archive of object files, which would then also
contain the Xpm files. Provided you don't get a problem with incompatible
Xpm versions, why don't you simply use ar to add an Xpm.a library of your
choice (the emphasis is on 'your choice') to forms.a if you want to avoid
some lengthy "-lforms -lXpm"? Your app might need some newer version than
xpm-3.4g which you would first have to remove from a forms.a if it were
integrated there.

-- 
         Dr.-Ing. Holger Veit             | INTERNET: Holger.Veit"at"gmd.de
|  |   / GMD - German National Research   | Phone: (+49) 2241 14 2448
|__|  /  Center for Information Technology| Fax:   (+49) 2241 14 2242
|  | /   Schloss Birlinghoven             |     XFree86/OS2 goes public!
|  |/    D-53754 Sankt Augustin, Germany  |    V3.2 from ftp.xfree86.org
         WWW: http://borneo.gmd.de/~veit/ |  /pub/XFree86/3.2/binaries/OS2
_________________________________________________
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/xforms-archive/