Converting Dynamic Libraries

Sisyphus kalinabears@iinet.net.au
Fri Aug 1 08:39:00 GMT 2003


----- Original Message -----
From: "Matthias David Siebler" <matthias@datapower.com>
To: <gcc-help@gcc.gnu.org>
Sent: Wednesday, July 30, 2003 3:50 AM
Subject: Converting Dynamic Libraries


>
> Hello:
>
> I have a debate about whether it is possible to convert a dynamic
> library (e.g. libm.so) into a static library (i.e. libm.a)
>
> I would argue that this is impossible since the act of creating a shared
> library strips out the necessary information required to create a static
> library.
>
> Am I correct?
>

With the msvc compiler on win32, it's simple to create a static lib from a
shared lib, if we have the '.def' file.

I believe it's also possible to create a def file from the shared lib if we
don't have it.

I would imagine the same to be possible with gcc on windows, and with gcc on
other platforms, too ..... but I don't really know.

Cheers,
Rob



More information about the Gcc-help mailing list