[clue] Linking static libraries into shared objects

Jeremy Slade jeremy at jkslade.net
Wed Jan 11 13:19:30 MST 2012


The .o's that went into the .a have to be compiled PIC (gcc -fPIC) in 
order to be linked into a shared library.


On 01/11/2012 01:04 PM, Jim Ockers wrote:
> Hi Gerard,
>
> I assume you have .a files which are archives of linkable library
> functions, but you didn't specify exactly. If you have .a or .o files,
> did you try something like this to make your shared library?
>
> gcc -shared functions.a otherfunction.o -o functions.so
> http://www.cplusplus.com/forum/unices/3737/
>
> Hope this helps,
> Jim
>
> --
> Jim Ockers, P.E., P.Eng. (ockers at ockers.net)
> Contact info: http://www.ockers.net/msi.html
>
>
> Gerard Nicol wrote:
>>
>> I have an apache module that in turn uses some of my other libraries.
>>
>> I really don’t want to relink all of my other libraries into shared
>> objects.
>>
>> Does anyone know how to statically link individual libraries into a
>> shared object?
>>
>> ------------------------------------------------------------------------
>>
>> _______________________________________________
>> clue mailing list:clue at cluedenver.org
>> For information, account preferences, or to unsubscribe see:
>> http://cluedenver.org/mailman/listinfo/clue
>
>
>
> _______________________________________________
> clue mailing list: clue at cluedenver.org
> For information, account preferences, or to unsubscribe see:
> http://cluedenver.org/mailman/listinfo/clue


More information about the clue mailing list