[fpc-devel] Staticaly link C/C++ library (.lib) into FreePascal on Windows
Sven Barth
pascaldragon at googlemail.com
Wed Mar 15 14:35:34 CET 2017
Am 15.03.2017 13:56 schrieb "LacaK" <lacak at zoznam.sk>:
>
> 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.
objdump is distributed as part of a FPC or Lazarus release.
Regards,
Sven
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.freepascal.org/pipermail/fpc-devel/attachments/20170315/2f87b412/attachment.html>
More information about the fpc-devel
mailing list