Recent

Author Topic: Building 32 bit programs[solved]  (Read 1198 times)

jbmckim

  • Full Member
  • ***
  • Posts: 144
Building 32 bit programs[solved]
« on: January 21, 2020, 11:57:53 pm »
Despite my knowing better, I thought I'd upgrade to 2.0.x from my old trusty 1.8 in the middle of a project.  Everything was working great under 1.8.  (I'm chasing some memory leaks that maybe aren't real so I thought I'd try newer code in hopes that hrc et al are either cleaner or clearer.)

The problem I'm having is that either running the program from the debugger or from FM gives an error: "The application was unable to start correctly 0xc000007b."  I checked and my .exe is 64bit and since the dll's are 32, I'm thinking that's the problem; in any case, it certainly is a major problem.

Details:
Windows 10 64 bit
Lazarus 2.0.6 r62129    FPC 3.0.4 x86_64-win64-win32/win64

The reason this mystifies me some is that I went to this site: https://sourceforge.net/projects/lazarus/files/Lazarus%20Windows%2032%20bits/ which bills itself as 32 bit.  The download file title is ...win64.exe but I'm a trusting soul so I gave it a go.  Nope, it's definitely 64 bit.  Further the targets don't support anything 32 bit that I can find.  (The IDE complains when I try to select Win32 etc. and the build fails.)

The dll's are legacy, deployed and tested and I therefore don't want to touch them.  So, how do I specify a 32 bit target or, where do I get a version that will build a 32 bit target.

Thanks.

« Last Edit: January 22, 2020, 06:05:03 pm by jbmckim »

wp

  • Hero Member
  • *****
  • Posts: 11857
Re: Building 32 bit programs
« Reply #1 on: January 22, 2020, 12:13:02 am »
The green button on that site is very misleading, I agree... Click the "Lazarus 2.0.6" link and this brings you to the "true" 32-bit version. Here is the direct download link: https://sourceforge.net/projects/lazarus/files/Lazarus%20Windows%2032%20bits/Lazarus%202.0.6/lazarus-2.0.6-fpc-3.0.4-win32.exe/download

When you run the installer I recommend to check the "Create secondary installation" checkbox, I think on the second page. You must specify a directory for the configuration files one or two pages later. This way you leave your old installation untouched and you can work with both versions. In fact, I have more than a dozon secondary installations on my system...

But be warned: When you once open a project in a newer version there is a chance that the new version will add new properties to the components, and this means that you may not be able to open lfm files in the old version any more. Therefore, always have a backup copy of your project when you switch Lazarus versions. Or better: work under version control (SVN, GIT, etc).

Martin_fr

  • Administrator
  • Hero Member
  • *
  • Posts: 9794
  • Debugger - SynEdit - and more
    • wiki
Re: Building 32 bit programs
« Reply #2 on: January 22, 2020, 12:15:40 am »
If I follow your link, and then go into the 2.0.6 folder, I see the following downloads offered:
Code: Text  [Select][+][-]
  1.  lazarus-2.0.6-fpc-3.0.4-win32.exe
  2. lazarus-2.0.6-fpc-3.0.4-cross-x86_64-win64-win32.exe
  3. lazarus-2.0.6-fpc-3.0.4-cross-arm-wince-win32.exe

None of them ends in "win64.exe".

You only want the first file: lazarus-2.0.6-fpc-3.0.4-win32.exe

However if your fpc is  x86_64-win64-win32/win64 then yes you have the 64bit version. I do not know how this happened.



I suggest to try the download again:
https://sourceforge.net/projects/lazarus/files/Lazarus%20Windows%2032%20bits/Lazarus%202.0.6/lazarus-2.0.6-fpc-3.0.4-win32.exe/download

Following this link, after the usual sourceforge 5 second wait, downloaded the 32bit installer.  (With the name lazarus-2.0.6-fpc-3.0.4-win32.exe )

I did install it myself for testing => 32bit.

Make sure you delete whatever version you currently have before you install.




EDIT:
Just seen WP's response.

Yes sourceforge always lists, whatever they think is your OS. You have to select from the files in the "table"
« Last Edit: January 22, 2020, 12:17:39 am by Martin_fr »

jbmckim

  • Full Member
  • ***
  • Posts: 144
Re: Building 32 bit programs
« Reply #3 on: January 22, 2020, 12:52:24 am »
Ah.  Pilot UI error.  The button I pushed is on the first page that contains the list of 32 bit releases.  I attached it.

I'm downloading the 32 bit now.  I'll update later.

jbmckim

  • Full Member
  • ***
  • Posts: 144
Re: Building 32 bit programs[solved]
« Reply #4 on: January 22, 2020, 06:06:02 pm »
All is fine now.  Short version is pay close attention to the download source.  The bright, shiny graphics are not necessarily your friend.

Thanks to wp for noticing this.
« Last Edit: January 24, 2020, 12:38:33 am by jbmckim »

 

TinyPortal © 2005-2018