[fpc-devel] Cross-linking a DLL

Alfred alfred at consulab.nl
Sat Dec 7 17:39:59 CET 2019

Dear All,

Looking at t_linux.pas, this code is common (also for other system 

if (isdll) then

And also:

if libraryadded and not(linklibc) and not(isdll) and 
(tf_section_threadvars in target_info.flags) then

When cross-compiling, this linker cannot be found in a flat directory 
with library-files (including the dynamic linker).
The only way to solve is using a -XR , and some extra directories. But 
this causes the linker not to be found on the target itself.

Before resorting to all kinds of trickery, I would like to ask if there 
is a more elegant way of handling this.

Executables can easily be cross-compiled. Its the compilation of libs 
that causes problems.

Greetings and thanks.

-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.freepascal.org/pipermail/fpc-devel/attachments/20191207/b2d09dcd/attachment-0001.html>

More information about the fpc-devel mailing list