<div dir="auto"><div><div class="gmail_quote"><div dir="ltr" class="gmail_attr">Ondrej Pokorny via fpc-pascal <<a href="mailto:fpc-pascal@lists.freepascal.org">fpc-pascal@lists.freepascal.org</a>> schrieb am Do., 6. Juni 2024, 09:30:<br></div><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">Hello,<br>
<br>
I am on Windows 64bit, but using the i386 compiler.<br>
<br>
I have to link a 3rd party OBJ file with {$L 'xyz.obj'}.<br>
<br>
With the internal linker I get these errors:<br>
Error: COMDAT selection mode 0 not supported (section: "0")<br>
Error: Failed reading coff file, invalid section index while reading xyz.obj<br>
Error: Associative COMDAT section for section ".rdata" not found<br></blockquote></div></div><div dir="auto"><br></div><div dir="auto">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? </div><div dir="auto"><br></div><div dir="auto"><div class="gmail_quote"><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">
<br>
So I tried to use the external linker with -Xe and I get these errors:<br>
Linking myProgram.exe<br>
ld: warning: directory not found for option '-L/usr/lib'<br>
ld: warning: directory not found for option '-F/System/Library/Frameworks/'<br>
ld: warning: option -b is obsolete and being ignored<br>
ld: file not found: pei-i386<br>
Error: Error while linking<br></blockquote></div></div><div dir="auto"><br></div><div dir="auto">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. </div><div dir="auto"><br></div><div dir="auto">Regards, </div><div dir="auto">Sven </div></div>