Recent

Author Topic: Making a 32bit with a 64bit.  (Read 3584 times)

Bazzao

  • Full Member
  • ***
  • Posts: 178
  • Pies are squared.
Making a 32bit with a 64bit.
« on: September 28, 2020, 08:44:31 am »
I am trying to compile an application to run in an XP virtual machine.

In Project Options:

I make a new build mode "32bit".

I select:
* Target OS = Win32
* Target CPU family = (Default)
* Target processor = (Default)

And I get
Error: Illegal parameter -Twin32
Bazza

Lazarus 2.0.10; FPC 3.2.0; SVN Revision 63526; x86_64-win64-win32/win64
Windows 10.

PascalDragon

  • Hero Member
  • *****
  • Posts: 5446
  • Compiler Developer
Re: Making a 32bit with a 64bit.
« Reply #1 on: September 28, 2020, 09:14:51 am »
I assume you use a 64-bit Lazarus: do you have a i386 cross compiler together with the units for Win32 installed? If you're on Windows you can download the i386-win32 addon and install it.

Thaddy

  • Hero Member
  • *****
  • Posts: 14201
  • Probably until I exterminate Putin.
Re: Making a 32bit with a 64bit.
« Reply #2 on: September 28, 2020, 09:21:40 am »
Note you can view the supported targets by running:
Code: Bash  [Select][+][-]
  1. fpc -it
If it does not list WIN32 as target, then you need the addon.
Specialize a type, not a var.

Bazzao

  • Full Member
  • ***
  • Posts: 178
  • Pies are squared.
Re: Making a 32bit with a 64bit.
« Reply #3 on: September 28, 2020, 09:37:12 am »
Thaddy's done it again.

Nope. I have to get the addon.

Thanks both PascalDragon and Thaddy.
Bazza

Lazarus 2.0.10; FPC 3.2.0; SVN Revision 63526; x86_64-win64-win32/win64
Windows 10.

Bazzao

  • Full Member
  • ***
  • Posts: 178
  • Pies are squared.
Re: Making a 32bit with a 64bit.
« Reply #4 on: September 28, 2020, 09:42:13 am »
Looks like I have to upgrade Lazarus. Should I delete it first? I run [yuk] Windows.


Bazza

Lazarus 2.0.10; FPC 3.2.0; SVN Revision 63526; x86_64-win64-win32/win64
Windows 10.

lucamar

  • Hero Member
  • *****
  • Posts: 4219
Re: Making a 32bit with a 64bit.
« Reply #5 on: September 28, 2020, 12:31:38 pm »
IIRC the Windows installer will detect a previous installation and ask you whether you want to uninstall it first or do a secondary installation, so there should be no need for you to do it manually. HTH.
Turbo Pascal 3 CP/M - Amstrad PCW 8256 (512 KB !!!) :P
Lazarus/FPC 2.0.8/3.0.4 & 2.0.12/3.2.0 - 32/64 bits on:
(K|L|X)Ubuntu 12..18, Windows XP, 7, 10 and various DOSes.

Thaddy

  • Hero Member
  • *****
  • Posts: 14201
  • Probably until I exterminate Putin.
Re: Making a 32bit with a 64bit.
« Reply #6 on: September 28, 2020, 12:37:01 pm »
IIRC the Windows installer will detect a previous installation and ask you whether you want to uninstall it first or do a secondary installation, so there should be no need for you to do it manually. HTH.
Last time I checked: no, it does not remove the hidden .lazarus directory.
Specialize a type, not a var.

Bazzao

  • Full Member
  • ***
  • Posts: 178
  • Pies are squared.
Re: Making a 32bit with a 64bit.
« Reply #7 on: September 28, 2020, 11:47:01 pm »
Good feedback lucamar & Thaddy.

I am using Windows, and there appears, using non microsoft software, to be no ".Lazarus" directory.

I actually have my Lazarus application directory as C:\Lazarus, and my projects on another drive.


Bazza

Lazarus 2.0.10; FPC 3.2.0; SVN Revision 63526; x86_64-win64-win32/win64
Windows 10.

Bazzao

  • Full Member
  • ***
  • Posts: 178
  • Pies are squared.
Re: Making a 32bit with a 64bit.
« Reply #8 on: September 29, 2020, 05:28:43 am »
Installed Lazarus 2.0.10; FPC 3.2.0; SVN Revision 63526; x86_64-win64-win32/win64.

Installed lazarus-2.0.10-fpc-3.2.0-cross-i386-win32-win64

But "fpc -it" is not showing Win32.

Evidently something must be manually done, but where's the instructions?
Bazza

Lazarus 2.0.10; FPC 3.2.0; SVN Revision 63526; x86_64-win64-win32/win64
Windows 10.

PascalDragon

  • Hero Member
  • *****
  • Posts: 5446
  • Compiler Developer
Re: Making a 32bit with a 64bit.
« Reply #9 on: September 29, 2020, 09:12:06 am »
You need to use fpc -Pi386 -it, cause the default in your case is the 64-bit one and that only lists the targets of the 64-bit compiler.

Bazzao

  • Full Member
  • ***
  • Posts: 178
  • Pies are squared.
Re: Making a 32bit with a 64bit.
« Reply #10 on: September 29, 2020, 09:19:14 am »
Ta, I shall look into that as soon as I solve the upgrade issues.

I will have to make it an option for the project, not a global, as at this stage, only 1 project is for XP.

Bazza

Lazarus 2.0.10; FPC 3.2.0; SVN Revision 63526; x86_64-win64-win32/win64
Windows 10.

Bazzao

  • Full Member
  • ***
  • Posts: 178
  • Pies are squared.
Re: Making a 32bit with a 64bit.
« Reply #11 on: September 30, 2020, 01:20:25 am »
All is looking good.

I ran the -Pi386 -it command, then configured my 32bit build move in Project Options, compiled, then copied the .exe to the XP VM, and ran it. Looks good.

With the troubles I experienced with the Lazarus upgrade, I would recommend deleting it first. I was jumping from ...

[at this stage I opened up an old thread, and found my profile is the recently changed one, not the original when posted. My intention was to get the previous versions numners of Lazarus & FPC] ...

Anyway Lazarus was 1. something.

Thanks to all.
Bazza

Lazarus 2.0.10; FPC 3.2.0; SVN Revision 63526; x86_64-win64-win32/win64
Windows 10.

 

TinyPortal © 2005-2018