[fpc-devel] Staticaly link C/C++ library (.lib) into FreePascal on Windows

Sven Barth pascaldragon at googlemail.com
Sun Mar 19 09:43:16 CET 2017


Am 19.03.2017 04:53 schrieb "silvioprog" <silvioprog at gmail.com>:
>
> On Wed, Mar 15, 2017 at 4:38 AM, LacaK <lacak at zoznam.sk> wrote:
>>>
>>> I forgot a question, could you send your ippi .a files for us? If so, I
can try a test here. :-)
>>
>>
>> Yes of course: I have uploaded them here
http://uschovna.zoznam.sk/download?code=1342688547227-EZyyeVzToDVVkkbJNCbN
>> But be aware of that I am on Windows, not Linux (Despite this I have
added to ZIP also .a files as they are installed by Intel into direcotry
"Linux". In direcory "Windows" are installed only .lib files).
>> If I can repeat my question: Can I use ".a" libraries also on Windows ?
If not can I use ".lib" created by C/C++ (I do not know how they are build)
>> Thank you
>>
>> -Laco.
>
>
> 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.

> 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.
And of course that is COFF as well. MSVC only supports COFF.

Regards,
Sven
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.freepascal.org/pipermail/fpc-devel/attachments/20170319/917190fa/attachment.html>


More information about the fpc-devel mailing list