* * *

Author Topic: Is my .exe 32 bit or 64 bit?  (Read 1279 times)

RedOctober

  • Full Member
  • ***
  • Posts: 218
Is my .exe 32 bit or 64 bit?
« on: March 13, 2018, 01:45:06 am »
Three months ago I used fpcupdeluxe to install the 64 bit version of Lazarus.  My "About" box says I'm running

x86_64-win64-win32/win64

I've been working away building a project, then, in my Project /Options /Compiler Options /Config and Target, "Target Specific Options" there is a checkbox named "-Win32 gui application (-WG)" and it has a check in the box.

I'm assuming this means that even though I downloaded and installed the 64 bit Lazarus, I'm actually building only 32bit applications (Microsoft Windows .exe).  Is my assumption correct?

So, if I now, uncheck that box, does that mean I will be building a .64bit Microsoft Windows .exe?
Further, does this incur a risk that maybe not all my code and all the components I used in my project are stable for 64bit?

How do I start a project as 64bit?... do I have to go into that checkbox and uncheck it each project that I want to be 64bit?

If I uncheck that box, do I have to choose a different Widget set?  one meant for 64 bit?

RAW

  • Hero Member
  • *****
  • Posts: 672
Re: Is my .exe 32 bit or 64 bit?
« Reply #1 on: March 13, 2018, 01:56:17 am »
Take a look at COMPILER OPTIONS -> CONFIG AND TARGET

Open the Windows Taskmanager and take a look at the *.exe. Newer Windows versions should display *32 for x86 programs...
Windows 7 Pro (x64 Sp1) And Windows XP Pro (x86 Sp3) - LAZARUS 1.8.4 FPC 3.0.4 // 1.7 FPC 3.1.1

josh

  • Hero Member
  • *****
  • Posts: 617
Re: Is my .exe 32 bit or 64 bit?
« Reply #2 on: March 13, 2018, 02:07:55 am »
Hi
If you wish to create 32 and 64bit targets, I would suggest creating a few different releases, you can then just switch between them.

Development Installation Lazarus 1.3, FPC 2.7.1,Windows 7/8 32/64, OSX, *nix

Test Environment Lazarus & FPC Trunk on Windows and OSX (Cocoa Mainly on OSX). Testing also Crosscompile windows to OSX.. 
Any posts made from 2015 will be based on Lazarus Trunk.

RedOctober

  • Full Member
  • ***
  • Posts: 218
Re: Is my .exe 32 bit or 64 bit?
« Reply #3 on: March 13, 2018, 03:09:32 am »
Excellent info Josh and RAW.  Thanks.

RedOctober

  • Full Member
  • ***
  • Posts: 218
Re: Is my .exe 32 bit or 64 bit?
« Reply #4 on: March 13, 2018, 03:58:19 am »
Here's a little mystery for you.  Even though my "Target Specific Options" checkbox named "-Win32 gui application (-WG) is checked, by .exe shows up in Task Manager as a 64bit app.  (My dev platform is Windows Server Essentials 2016)  On this OS, 32 bit apps are clearly indicated in words "(32 bit)".

So it appears I am making a 64bit application even though my compiler says I'm making a 32bit application.

RAW

  • Hero Member
  • *****
  • Posts: 672
Re: Is my .exe 32 bit or 64 bit?
« Reply #5 on: March 13, 2018, 04:27:19 am »
-WG Flag = necessary for GUI Applications !!! Standard Windows Programs...  :)
Windows 7 Pro (x64 Sp1) And Windows XP Pro (x86 Sp3) - LAZARUS 1.8.4 FPC 3.0.4 // 1.7 FPC 3.1.1

dbannon

  • Sr. Member
  • ****
  • Posts: 302
Re: Is my .exe 32 bit or 64 bit?
« Reply #6 on: March 13, 2018, 09:44:59 am »
I also have that "Win32 gui application (-WG, ignored)" ticked on my project options and I am looking at it on a 64bit linux box and I am pretty sure the binaries I make are, in fact 64bit Linux apps.

Its under a heading of "Target Specific" and I understand it to mean that that particular setting is only applicable when making Win32 apps. Whats important is the setting in the box above, "Target Platform".



Lazarus 1.8, Linux (and reluctantly Win10, OSX)

SymbolicFrank

  • Sr. Member
  • ****
  • Posts: 394
Re: Is my .exe 32 bit or 64 bit?
« Reply #7 on: March 13, 2018, 11:28:53 am »
"Win32" is the name of the platform and API, it has nothing to do with the number of bits. The "32" is because it was the sequel to the 16-bit Windows platform. It is just a collection of DLL's and a set of functions you can call.

If you want to make a 64-bit application, it will use the 64-bit DLL's in the "System32" directory, while if you make a 32-bit application, it uses the 32-bit DLL's in the "SysWOW64" directory...

The "System32" directory replaced the "System" directory that held the 16-bit DLL's, and later the "SysWOW64" directory was introduced. It is actually the "System32" directory for applications that run in the 32-bit Windows-On-Windows Virtual Machine.

 :o

 

Recent

Get Lazarus at SourceForge.net. Fast, secure and Free Open Source software downloads Open Hub project report for Lazarus