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

LacaK lacak at zoznam.sk
Wed Mar 15 13:56:19 CET 2017


Dňa 15.3.2017 o 12:54 Yury Sidorov napísal(a):
> On 3/14/2017 4:47 PM, Ladislav Karrach wrote:
>>
>>> Did you try this:
>>>   function ippiThreshold(pSrcDst: PIpp8u; srcDstStep: int;
>>>           roiSize: IppiSize; thresholdLT: Ipp8u; valueLT: Ipp8u;
>>> thresholdGT: Ipp8u;
>>>           valueGT: Ipp8u): IppStatus; external 'ippi.dll' name
>>> 'ippiThreshold_LTValGTVal_8u_C1IR';
>>> You should use
>>> objdump -p ippi.dll
>>> to get the names of the exported procedures/functions.
>> Yes I know, this work: external 'ippi.dll' (I have added also "stdcall")
>> But my question was regarding how to staticaly link provided libraries
>> into my EXE (so I do not want distribute also all DLLs)
>> Just like one can do it in C/C++
>
> 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.




More information about the fpc-devel mailing list