Recent

Author Topic: [solved] Cross compile Win32 -> MS-DOS  (Read 2945 times)

piola

  • Jr. Member
  • **
  • Posts: 74
[solved] Cross compile Win32 -> MS-DOS
« on: May 30, 2021, 11:17:13 pm »
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?
« Last Edit: June 23, 2021, 11:59:27 pm by piola »

PascalDragon

  • Hero Member
  • *****
  • Posts: 3513
  • Compiler Developer
Re: Cross compile Win32 -> MS-DOS
« Reply #1 on: May 31, 2021, 01:11:53 pm »
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

  • Jr. Member
  • **
  • Posts: 74
Re: Cross compile Win32 -> MS-DOS
« Reply #2 on: June 01, 2021, 04:32:14 pm »
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

  • Hero Member
  • *****
  • Posts: 3513
  • Compiler Developer
Re: Cross compile Win32 -> MS-DOS
« Reply #3 on: June 02, 2021, 09:07:21 am »
It 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

  • Jr. Member
  • **
  • Posts: 74
Re: Cross compile Win32 -> MS-DOS
« Reply #4 on: June 02, 2021, 02:31:57 pm »
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.

 

TinyPortal © 2005-2018