[fpc-devel] Staticaly link C/C++ library (.lib) into FreePascal on Windows
LacaK
lacak at zoznam.sk
Wed Mar 15 17:06:29 CET 2017
> >>
> >>
> >> 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
[ 1](sec 1)(fl 0x00)(ty 0)(scl 3) (nx 0) 0x00000000 .idata$5
[ 2](sec 2)(fl 0x00)(ty 0)(scl 3) (nx 0) 0x00000000 .idata$6
[ 3](sec 3)(fl 0x00)(ty 0)(scl 3) (nx 0) 0x00000000 .text
[ 4](sec 1)(fl 0x00)(ty 0)(scl 2) (nx 0) 0x00000000 __imp__ippMalloc at 4
[ 5](sec 3)(fl 0x00)(ty 0)(scl 2) (nx 0) 0x00000000 _ippMalloc at 4
[ 6](sec 0)(fl 0x00)(ty 0)(scl 2) (nx 0) 0x00000000
__IMPORT_DESCRIPTOR_ippcore
When I use "objdump -t libippcore.a" I get:
In archive libippcore.a:
objdump: pcorever.o: File format not recognized
objdump: owninit.o: File format not recognized
objdump: ownfinitenans.o: File format not recognized
objdump: owncpufeatures.o: File format not recognized
objdump: owncpudefs.o: File format not recognized
objdump: ippstatus.o: File format not recognized
objdump: ippompinit.o: File format not recognized
objdump: ippnanfp.o: File format not recognized
objdump: ippmalloc64x.o: File format not recognized
objdump: ippmalloc.o: File format not recognized
objdump: ippl2cache.o: File format not recognized
objdump: ippinit.o: File format not recognized
objdump: ippftzdaz.o: File format not recognized
objdump: ippcpufreq.o: File format not recognized
objdump: ippcpufeatures.o: File format not recognized
objdump: ippcpu.o: File format not recognized
objdump: ippcachesize.o: File format not recognized
objdump: ippalignptr.o: File format not recognized
objdump: safeinit32eas.o: File format not recognized
objdump: pscpuinfo32eas.o: File format not recognized
objdump: pscpudef32eas.o: File format not recognized
objdump: ps_destroy_ssx_32e.o: File format not recognized
objdump: intel_f2int.o: File format not recognized
But this can be because probably "libippcore.a" is for Linux 64 ...
L.
More information about the fpc-devel
mailing list