ITEM: T6174L

Wants to combine static and shared libraries



Question: 

ENV
BOS 3.2.5

DESC
Customer an application which uses the NetView/6000 libraries.
They're wanting to distribute this application to machines which
don't have the NV/6000 libraries installed. Linking everything 
static produces an excessively large executable. Linking shared
requires that the target machine have the NV/6000 libraries
installed. Customer is looking for a way to selectively link
some symbols static, and some shared.

Response:

First use ld to create a temporary static object containing the symbols 
you need to have static for example: 
ld first.o second.o -r -bnso -o tmp.o 

Next use ld again to link your static object (tmp.o) to the libraries 
that you want shared for example: 
ld tmp.o -lc -T512 -H512 

In this case the libc.a shared library will be shared while first.o and second.o
remain static.


Support Line: Wants to combine static and shared libraries ITEM: T6174L
Dated: May 1995 Category: N/A
This HTML file was generated 99/06/24~13:30:35
Comments or suggestions? Contact us