Fwd: Statically linking a shared library to another library to be statically linked

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



Resending due to no response ....

---------- Forwarded message ----------
From: Mohit Kumar <mohit.kumar@xxxxxxxxx>
Date: Mon, 30 May 2005 17:52:37 +0530
Subject: Statically linking a shared library to another library to be
statically linked
To: gcc-help@xxxxxxxxxxx

Hi All,

First of all, apologies for such a cryptic subject, even I took some
time to figure out how should I frame the subject but could not think
of any better way.

I am stuck with the following scenario:

Suppose I have three files: libone.a, libtwo.a and libmain.so, and I
want to implement the followinf hierarchy:
    libmain.so
        |-----libtwo.a
                   |-----libone.a

As far as linking libtwo.a to libmain.so is concerned I am aware I
need to use '-l' flag at link time.
But is there a way I can link a .a file to another .a file?

I am aware I can do the following:
ar x libone.a ----> generates all the .o's
ar q libtwo.o *.o's 

However I am looking for a cleaner way.

Any help in this regard would be highly appreciable.

Thanks,
Mohit


[Index of Archives]     [Linux C Programming]     [Linux Kernel]     [eCos]     [Fedora Development]     [Fedora Announce]     [Autoconf]     [The DWARVES Debugging Tools]     [Yosemite Campsites]     [Yosemite News]     [Linux GCC]

  Powered by Linux