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

Yury Sidorov jura at cp-lab.com
Wed Mar 15 18:09:16 CET 2017


On 3/15/2017 6:06 PM, LacaK wrote:
>
>> >>
>> >>
>> >> Yes, you can statically link a COFF library created by other compiler.
>> >>
>> >> Use objdump as explained earlier to find out the name of ippiThreshold function in the static library. It may be prefixed with
>> "_".
>> >
>> > But does it works also on Windows ? (as far as I does not have "objdump" utility there?)
>> > L.
>>
>> objdump is distributed as part of a FPC or Lazarus release.
>>
> Thank you!
>
> Now I can use "objdump -t ippcore.lib" and I get something like this:
>
> ippcore.dll:     file format pei-i386
>
> SYMBOL TABLE:
> [  0](sec  0)(fl 0x00)(ty   0)(scl   3) (nx 0) 0x00000000 .idata$4

ippcore.lib is just an import library for ippcore.dll. You should not 
use it for static linking.
According to the Intel's site you should use the following libs for 
static linking:
ippimt.lib ippsmt.lib ippcorelmt.lib

Yury.



More information about the fpc-devel mailing list