[fpc-pascal] How to use external linker on windows i386
Ondrej Pokorny
lazarus at kluug.net
Thu Jun 6 09:29:42 CEST 2024
Hello,
I am on Windows 64bit, but using the i386 compiler.
I have to link a 3rd party OBJ file with {$L 'xyz.obj'}.
With the internal linker I get these errors:
Error: COMDAT selection mode 0 not supported (section: "0")
Error: Failed reading coff file, invalid section index while reading xyz.obj
Error: Associative COMDAT section for section ".rdata" not found
So I tried to use the external linker with -Xe and I get these errors:
Linking myProgram.exe
ld: warning: directory not found for option '-L/usr/lib'
ld: warning: directory not found for option '-F/System/Library/Frameworks/'
ld: warning: option -b is obsolete and being ignored
ld: file not found: pei-i386
Error: Error while linking
I searched for any information but couldn't find any help or tutorial
how to setup the external linker.
I tried:
I downloaded the current mingw32 binaries and registered the search path
with:
-Xe -XRp:\software\MinGW\mingw32\bin
But it didn't not help - still the same error.
Can anybody help please?
Delphi can link the OBJ file without problems.
Thanks
Ondrej
More information about the fpc-pascal
mailing list