[fpc-devel] Staticaly link C/C++ library (.lib) into FreePascal on Windows
silvioprog
silvioprog at gmail.com
Sun Mar 19 20:28:11 CET 2017
On Sun, Mar 19, 2017 at 5:43 AM, Sven Barth via fpc-devel <
fpc-devel at lists.freepascal.org> wrote:
> Am 19.03.2017 04:53 schrieb "silvioprog" <silvioprog at gmail.com>:
>
> Unfortunately you can't use the static libraries (.a) of Intel because
> they are generated for Linux, in spite of static libraries be
> cross-platform.
>
> Non-sense. Static libraries are as platform specific as any other binary
> code, after all it needs to call OS functions.
>
Well, I understand by cross-platform anything that is implemented on
multiple platforms, so once ar archives can be generated for multiple ones,
it makes sense for me. :-)
> I'm not sure about the .lib files. MS's COFF files adopt the .lib
> extension, but it is a little bit strange these sizes below:
> >
> > `libippi.a`:
> > . original - 251 MB;
> > . striped - 192 MB.
> >
> > `libippi.lib`:
> > . original - 853 KB;
> > . striped - no strip needed, it is already small.
>
> Seems like the second one is merely an import library for the DLL instead
> of a real static library.
>
Indeed.
And of course that is COFF as well. MSVC only supports COFF.
>
There isn't only one kind of COFF, AFAIK MS has an own COFF style and MSVC
supports only that. Sure, Intel must have used MSVC ones. However, my
*suggestion* about LacaK confirming that was just because he can generate
an object or a shared library from a MS COFF file, solving his problem!
--
Silvio Clécio
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.freepascal.org/pipermail/fpc-devel/attachments/20170319/6a1d372b/attachment.html>
More information about the fpc-devel
mailing list