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

2017-03-14 Thread LacaK
Hi, I have C/C++ librarby (".lib" for Windows and ".a" for Linux) from Intel IPP package (they distribute ".lib" and also ".dll" for Windows and ".a" for Linux) Can I link in FPC (on Windows) at compile time to this ".lib" versions ? Or only possible way is link at runtime using ".dll" (and

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

2017-03-14 Thread Sven Barth via fpc-devel
Am 14.03.2017 14:33 schrieb "Sven Barth" : > > Am 14.03.2017 13:30 schrieb "LacaK" : > > > > Hi, > > > > I have C/C++ librarby (".lib" for Windows and ".a" for Linux) from Intel IPP package (they distribute ".lib" and also ".dll" for Windows and ".a" for Linux) > > > > Can I link in FPC (on Windows

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

2017-03-14 Thread Sven Barth via fpc-devel
Am 14.03.2017 13:30 schrieb "LacaK" : > > Hi, > > I have C/C++ librarby (".lib" for Windows and ".a" for Linux) from Intel IPP package (they distribute ".lib" and also ".dll" for Windows and ".a" for Linux) > > Can I link in FPC (on Windows) at compile time to this ".lib" versions ? Or only possibl

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

2017-03-14 Thread Tomas Hajny
On Tue, March 14, 2017 14:36, Sven Barth via fpc-devel wrote: > Am 14.03.2017 14:33 schrieb "Sven Barth" : >> Am 14.03.2017 13:30 schrieb "LacaK" : >> > >> > Hi, >> > >> > I have C/C++ librarby (".lib" for Windows and ".a" for Linux) from > Intel IPP package (they distribute ".lib" and also ".dll"

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

2017-03-14 Thread Pierre Free Pascal
> -Message d'origine- > De : fpc-devel [mailto:fpc-devel-boun...@lists.freepascal.org] De la > part de LacaK > Envoyé : mardi 14 mars 2017 13:30 > À : fpc-devel@lists.freepascal.org > Objet : [fpc-devel] Staticaly link C/C++ library (.lib) into FreePascal >

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

2017-03-14 Thread silvioprog
On Tue, Mar 14, 2017 at 10:36 AM, Sven Barth via fpc-devel < fpc-devel@lists.freepascal.org> wrote: [...] > Small correction: I meant "static COFF libraries", not "COFF import > libraries" (the later can be considered a special case of the former > though). > Is there any plan to support COFF obje

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

2017-03-14 Thread silvioprog
On Tue, Mar 14, 2017 at 9:30 AM, LacaK wrote: > Hi, > > I have C/C++ librarby (".lib" for Windows and ".a" for Linux) from Intel > IPP package (they distribute ".lib" and also ".dll" for Windows and ".a" > for Linux) > > Can I link in FPC (on Windows) at compile time to this ".lib" versions ? > O

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

2017-03-14 Thread silvioprog
On Tue, Mar 14, 2017 at 11:57 AM, silvioprog wrote: [...] > Anyway I've tried to use COFF objects on Windows, but I'm not sure if FPC > supports that because it returns a "illegal COFF magic while reading some > lib". :-/ (on Linux it works like a charm) > Oh, sorry. It works on Windows too. I'v

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

2017-03-14 Thread silvioprog
On Tue, Mar 14, 2017 at 11:29 AM, silvioprog wrote: > On Tue, Mar 14, 2017 at 10:36 AM, Sven Barth via fpc-devel < > fpc-devel@lists.freepascal.org> wrote: > [...] > >> Small correction: I meant "static COFF libraries", not "COFF import >> libraries" (the later can be considered a special case of

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

2017-03-14 Thread Adriaan van Os
LacaK wrote: Hi, I have C/C++ librarby (".lib" for Windows and ".a" for Linux) from Intel IPP package (they distribute ".lib" and also ".dll" for Windows and ".a" for Linux) Note that you can download my ipp FPC interfaces here . I do link with statical

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

2017-03-14 Thread LacaK
Dňa 14.3.2017 o 15:57 silvioprog napísal(a): On Tue, Mar 14, 2017 at 9:30 AM, LacaK > wrote: Hi, I have C/C++ librarby (".lib" for Windows and ".a" for Linux) from Intel IPP package (they distribute ".lib" and also ".dll" for Windows and ".a" for Linux)

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

2017-03-14 Thread silvioprog
On Tue, Mar 14, 2017 at 12:26 PM, LacaK wrote: > Dňa 14.3.2017 o 15:57 silvioprog napísal(a): [...] > here I get (without {$linklib}): > Error: Undefined symbol: IPP__IPPITHRESHOLD_LTVAL_8U_C1 > IR$PIPP8U$LONGINT$IPPISIZE$BYTE$BYTE$$IPPSTATUS > > test 2: put the library implementation below f

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

2017-03-14 Thread silvioprog
On Tue, Mar 14, 2017 at 12:39 PM, silvioprog wrote: > On Tue, Mar 14, 2017 at 12:26 PM, LacaK wrote: > >> Dňa 14.3.2017 o 15:57 silvioprog napísal(a): > > [...] > >> here I get (without {$linklib}): >> Error: Undefined symbol: IPP__IPPITHRESHOLD_LTVAL_8U_C1 >> IR$PIPP8U$LONGINT$IPPISIZE$BYTE$B

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

2017-03-15 Thread LacaK
Error: Undefined symbol: IPP__IPPITHRESHOLD_LTVAL_8U_C1IR$PIPP8U$LONGINT$IPPISIZE$BYTE$BYTE$$IPPSTATUS test 2: put the library implementation below function declaration, eg: function _ippiThreshold_LTValGTVal_8u_C1IR(pSrcDst: PIpp8u; srcDstStep: int;

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

2017-03-15 Thread Ladislav Karrach
Note that you can download my ipp FPC interfaces here . I do link with statically with success on Mac OS X. Yes I am aware of your port and I have downloaded it, but I am on Windows and I cannot succeed in statically linking on Windows ... L. __

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

2017-03-15 Thread Ladislav Karrach
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.dl

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

2017-03-15 Thread Yury Sidorov
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_LTValGTVa

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

2017-03-15 Thread LacaK
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; e

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

2017-03-15 Thread Sven Barth via fpc-devel
Am 15.03.2017 13:56 schrieb "LacaK" : > > 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: I

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

2017-03-15 Thread LacaK
>> >> >> 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

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

2017-03-15 Thread Yury Sidorov
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 ? (

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

2017-03-15 Thread Sven Barth via fpc-devel
Am 15.03.2017 17:06 schrieb "LacaK" : > But this can be because probably "libippcore.a" is for Linux 64 ... Yes, the Windows one only supports PE, not ELF. Regards, Sven ___ fpc-devel maillist - fpc-devel@lists.freepascal.org http://lists.freepascal.o

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

2017-03-16 Thread LacaK
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 Thank you! Now I do: {$linklib ippcoremt.lib} function ippGetLibVers

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

2017-03-16 Thread Karoly Balogh (Charlie/SGR)
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

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

2017-03-16 Thread LacaK
Dňa 16.3.2017 o 10:03 Karoly Balogh (Charlie/SGR) napísal(a): 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 f

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

2017-03-16 Thread Yury Sidorov
On 3/16/2017 12:01 PM, LacaK wrote: Then I get: test_IPP.lpr(17,1) Error: undefined reference to `ippGetLibVersion' (I have tried also: _ippGetLibVersion, _ippGetLibVersion@0 ...) I've downloaded the IPP libs and did some tests to make sure that static linking is possible. The working decl

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

2017-03-16 Thread LacaK
Then I get: test_IPP.lpr(17,1) Error: undefined reference to `ippGetLibVersion' (I have tried also: _ippGetLibVersion, _ippGetLibVersion@0 ...) I've downloaded the IPP libs and did some tests to make sure that static linking is possible. Thank you very much for your effort! You use cdecl,

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

2017-03-16 Thread Yury Sidorov
On 3/16/2017 1:12 PM, LacaK wrote: Then I get: test_IPP.lpr(17,1) Error: undefined reference to `ippGetLibVersion' (I have tried also: _ippGetLibVersion, _ippGetLibVersion@0 ...) I've downloaded the IPP libs and did some tests to make sure that static linking is possible. Thank you very mu

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

2017-03-16 Thread LacaK
Besides that it does not work for me, when I add another two functions. Attached my example. I get error: .\Intel_IPP\\ippcoremt.lib(C:/commander/production/ipp201702gold/windows_ia32/.build/windows/obj/ia32/core/s/st/owncpufeatures.obj):(.text[_ownGetMaskFeatures]+0x35): undefined refere

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

2017-03-18 Thread silvioprog
On Wed, Mar 15, 2017 at 4:38 AM, LacaK 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/down > load?code=1342688547227-EZyyeVzToDVVkkbJNCbN > But be aware of that

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

2017-03-19 Thread Sven Barth via fpc-devel
Am 19.03.2017 04:53 schrieb "silvioprog" : > > On Wed, Mar 15, 2017 at 4:38 AM, LacaK 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=1342688547

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

2017-03-19 Thread silvioprog
On Sun, Mar 19, 2017 at 5:43 AM, Sven Barth via fpc-devel < fpc-devel@lists.freepascal.org> wrote: > Am 19.03.2017 04:53 schrieb "silvioprog" : > > Unfortunately you can't use the static libraries (.a) of Intel because > they are generated for Linux, in spite of static libraries be > cross-platfor