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

Karoly Balogh (Charlie/SGR) charlie at scenergy.dfmk.hu
Thu Mar 16 10:03:40 CET 2017


Hi,

On Thu, 16 Mar 2017, LacaK wrote:

> Then I get another error:
>    test_IPP.lpr(24,1) Error: Illegal COFF Magic while reading
> .\Intel_IPP\ippcoremt.lib
>
> Am I doing something wrong, or there is some kind of incompatibility
> between format of supplied libraries and object files supported by FPC ?
> (I am on FPC 2.6.4 , is there chance when I will use 3.0.2 that
> something changes in this?)

Someone wrote already, that the internal linker doesn't support static
libraries. You have to use -Xe (GNU LD, as external linker) to have a
fighting chance for this to work. It's bundled with FPC. Again, I'm not
saying it will work with GNU LD, I'm saying it won't work with the
internal linker, and that's true for any FPC version currently.

Charlie



More information about the fpc-devel mailing list