Forum > Other

[solved] Cross compile Win32 -> MS-DOS

(1/1)

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

--- Quote from: piola on June 01, 2021, 04:32:14 pm ---It seems to me that Lazarus sends some Parameters which might cause the problem. I found out that especially "-a" gives this error.

--- End quote ---

The -a option requires the use of the external toolchain.

piola:
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.

Navigation

[0] Message Index

Go to full version