Ondrej Pokorny via fpc-pascal <fpc-pascal@lists.freepascal.org> schrieb am
Do., 6. Juni 2024, 09:30:

> 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
>

Can you provide a small example as a bug report that shows this behavior
(preferably also with source for the object file) so that we can improve
the internal linker?


> 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
>

That reads like the compiler is picking up the wrong linker (a WSL one
perhaps?). The ld.exe (probably with platform prefix) should already be
located in the compiler's binary directory and PATH needs to point to that
first.

Regards,
Sven
_______________________________________________
fpc-pascal maillist  -  fpc-pascal@lists.freepascal.org
https://lists.freepascal.org/cgi-bin/mailman/listinfo/fpc-pascal

Reply via email to