Lazarus

Using the Lazarus IDE => Options => Topic started by: Bazzao on September 28, 2020, 08:44:31 am

Title: Making a 32bit with a 64bit.
Post by: Bazzao 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
Title: Re: Making a 32bit with a 64bit.
Post by: PascalDragon 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.
Title: Re: Making a 32bit with a 64bit.
Post by: Thaddy 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.
Title: Re: Making a 32bit with a 64bit.
Post by: Bazzao 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.
Title: Re: Making a 32bit with a 64bit.
Post by: Bazzao on September 28, 2020, 09:42:13 am
Looks like I have to upgrade Lazarus. Should I delete it first? I run [yuk] Windows.


Title: Re: Making a 32bit with a 64bit.
Post by: lucamar 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.
Title: Re: Making a 32bit with a 64bit.
Post by: Thaddy 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.
Title: Re: Making a 32bit with a 64bit.
Post by: Bazzao 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.


Title: Re: Making a 32bit with a 64bit.
Post by: Bazzao 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?
Title: Re: Making a 32bit with a 64bit.
Post by: PascalDragon 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.
Title: Re: Making a 32bit with a 64bit.
Post by: Bazzao 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.

Title: Re: Making a 32bit with a 64bit.
Post by: Bazzao 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.
TinyPortal © 2005-2018