[solved] Cross compile Win32 -> MS-DOS lazarus / 36-Other ---------------------------------------------------------------------- piola · 2021-05-30 21:17 Hello, I'd like to do a cross-compile from Win32 to MS-DOS target. I have installed the FPC cross-compiler and updated the fpc.cfg file as recommended. I can run "ppcross8086 -WmSmall something.lpr" and it compiles fine. In Lazarus, I have set TargetOS=MSDOS, TargetCPU=i8086. However, I get an error "Util wlink.exe not found, switching to external linking". According to the release notes and the DOS-wiki-page, FPC has an internal linker not needing wlink.exe any more. What am I doing wrong? ---------------------------------------------------------------------- PascalDragon · 2021-05-31 11:11 Does the ppcross8086.exe reside in the same directory as the fpc.exe that is setup in Lazarus' settings? Otherwise you'll have to point that to the ppcross8086.exe directly. ---------------------------------------------------------------------- piola · 2021-06-01 14:32 Yes. It seems to me that Lazarus sends some Parameters which might cause the problem. I found out that especially "-a" gives this error. ---------------------------------------------------------------------- PascalDragon · 2021-06-02 07:07 Quote from: piola on June 01, 2021, 04:32:14 pmIt seems to me that Lazarus sends some Parameters which might cause the problem. I found out that especially "-a" gives this error. The -a option requires the use of the external toolchain. ---------------------------------------------------------------------- piola · 2021-06-02 12:31 Ok, I found the problem. I had enabled the checkbox "generate info for debugger", and this seems to be incompatible with the internal linker of Free Pascal.