Lazarus

Programming => General => Topic started by: mtanner on February 10, 2019, 09:40:04 am

Title: 32/84 bit Windows
Post by: mtanner on February 10, 2019, 09:40:04 am
I have finally mamaged to move my development work off XP onto Win7 64-bit. How do I know/control whether Lazarus is compiling a 32 or 64-bit exe?

And am I correct in thinking that a 32 bit exe should be able to run on a 64-bit system? (I tried instaling an old 32-bit image utility that I have found useful i the past, but the installation package jusy said it was invalid on the Win7/64bit - not a big problem but it made me wonder.)
Title: Re: 32/84 bit Windows
Post by: Handoko on February 10, 2019, 10:11:03 am
How do I know/control whether Lazarus is compiling a 32 or 64-bit exe?

Lazarus main menu > Project > Project Options > Compiler Options > Config and Target > Target OS (choose Win32 or Win64)

And am I correct in thinking that a 32 bit exe should be able to run on a 64-bit system? (I tried instaling an old 32-bit image utility that I have found useful i the past, but the installation package jusy said it was invalid on the Win7/64bit - not a big problem but it made me wonder.)

Really? That's weird.
Title: Re: 32/84 bit Windows
Post by: mtanner on February 10, 2019, 10:38:21 am
Handoko thank you.

Maybe the old utility (originally used on Win 2000 !!, but has been ok up to XP) installation packahe just didi not recognise Win7. Also the utility is part of a bigger package that interfaces to MW Word, so maybe that has something to do with it. I will try just copying the utility exe from the XP system.
Title: Re: 32/84 bit Windows
Post by: jamie on February 10, 2019, 02:56:43 pm
32 bit apps run fine on Windows 64 bit.

I have both installed on this windows 10 PC because there are still many small windows tablets and
PC's that run the 32 bit versions
Title: Re: 32/84 bit Windows
Post by: ASBzone on February 10, 2019, 03:34:56 pm
(I tried instaling an old 32-bit image utility that I have found useful i the past, but the installation package jusy said it was invalid on the Win7/64bit - not a big problem but it made me wonder.)


There are some old installers that rely on 16-bit code for the installer.   Those will fail on 64-bit Windows, because the Windows subsystems for executing 16-bit code have been removed on 64-bit Windows.


This is an issue with the 16-bit installer, and not the 32-bit application.
Title: Re: 32/84 bit Windows
Post by: Remy Lebeau on February 10, 2019, 09:56:21 pm
And am I correct in thinking that a 32 bit exe should be able to run on a 64-bit system?

Typically yes, but not always.  In particular, on Windows, the WOW64 emulator is required in order to run 32bit EXEs on a 64bit system (https://docs.microsoft.com/en-us/windows/desktop/WinProg64/running-32-bit-applications), and starting with Windows Server 2008 R2, WOW64 is now optional (https://docs.microsoft.com/en-us/windows/desktop/win7appqual/wow64-is-now-an-optional-feature-for-server-core) and may not be installed.
Title: Re: 32/84 bit Windows
Post by: ASBzone on February 10, 2019, 10:52:05 pm
And am I correct in thinking that a 32 bit exe should be able to run on a 64-bit system?

Typically yes, but not always.  In particular, on Windows, the WOW64 emulator is required in order to run 32bit EXEs on a 64bit system (https://docs.microsoft.com/en-us/windows/desktop/WinProg64/running-32-bit-applications), and starting with Windows Server 2008 R2, WOW64 is now optional (https://docs.microsoft.com/en-us/windows/desktop/win7appqual/wow64-is-now-an-optional-feature-for-server-core) and may not be installed.


In fairness, while accurate, that information wouldn't apply to 90% of the installations out there, including 100% of the desktop Windows installations...
Title: Re: 32/84 bit Windows
Post by: Remy Lebeau on February 11, 2019, 01:09:48 am
In fairness, while accurate, that information wouldn't apply to 90% of the installations out there, including 100% of the desktop Windows installations...

For now, yes. But who knows, maybe someday Microsoft will decide to phase out 32bit support in Desktop editions too, and make WOW64 optional for everyone.
Title: Re: 32/84 bit Windows
Post by: PascalDragon on February 11, 2019, 04:14:29 pm
(I tried instaling an old 32-bit image utility that I have found useful i the past, but the installation package jusy said it was invalid on the Win7/64bit - not a big problem but it made me wonder.)


There are some old installers that rely on 16-bit code for the installer.   Those will fail on 64-bit Windows, because the Windows subsystems for executing 16-bit code have been removed on 64-bit Windows.


This is an issue with the 16-bit installer, and not the 32-bit application.
Some of these installers are however handled by Windows by replacing the 16-bit stub with a 32-bit one. ;) (see here (https://docs.microsoft.com/en-us/windows/desktop/winprog64/application-installation))
Title: Re: 32/84 bit Windows
Post by: marcov on February 11, 2019, 04:21:45 pm
Note that Microsoft's win7 extended support EOL is less than an year away (January 14, 2020)
TinyPortal © 2005-2018