Recent

Author Topic: Errors when switching to 64 bit  (Read 2470 times)

TyneBridges

  • Full Member
  • ***
  • Posts: 150
    • Personal blog
Errors when switching to 64 bit
« on: January 08, 2021, 08:22:46 pm »
I'm trying to generate a Windows 64 bit application using the following Lazarus version.

Version 2.0.10
FPC Version 3.2.0
i386-win32-win32/win64

I have no need for 32 bit applications (so I don't think I need a cross-compiler) and thought I had installed the 64 bit version. However, I can see from my first application that it has been compiled as 32 bit.

When I tried to switch the project to 64 bit by editing Compiler Options > Config and Target under Project Options, changing the Target 0S to Win64 gave the error "The current FPC has no config file" and then "The project uses target OS=Win64 and CPU=i386. The system.ppu for this target was not found in the FPC binary directories." This happens even after deselecting "Win32 gui application" because my target is a Win64 application.

Have I installed the wrong version of Lazarus? Is there a simple guide somewhere to these compiler options? I can't follow them at all.

I realise I will probably have to amend some code references once the project is treated as 64 bit.

Thanks.
John H, north east England
Lover of the old Delphi, still inexperienced with FPC/Lazarus and not an instinctive programmer

Martin_fr

  • Administrator
  • Hero Member
  • *
  • Posts: 9857
  • Debugger - SynEdit - and more
    • wiki
Re: Errors when switching to 64 bit
« Reply #1 on: January 08, 2021, 08:34:51 pm »
"The project uses target OS=Win64 and CPU=i386. T
Should be CPU x86_64


Usually when you make changes in the "target" settings, you will need a cross compiler.

If (I assume) your setup normally (without an extra settings) generated a 32bit exe, then you have a 32 bit compiler.
 (use the windows task manager, it will append "(32)" to any running 32 bit process)

I do not know where and what installer you downloaded, and if that includes a cross compiler or not.

On our SourceForge site there are "Windows 32" and "Window 64" sections. Each have all the versions of Lazarus. Those installers also include fpc for the same bitness. 
In addition for each version, there are cross compilers which can be installed into the same directory as you main install.

(The installer also features a 2ndary independent install).

Note: that you also need gdb for the correct bitness (comes with the install or cross-install). And there may be generally issues trying to debug 64bit, if your IDE is 32bit.



« Last Edit: January 08, 2021, 08:41:52 pm by Martin_fr »

TyneBridges

  • Full Member
  • ***
  • Posts: 150
    • Personal blog
Re: Errors when switching to 64 bit
« Reply #2 on: January 09, 2021, 04:03:57 pm »
Thanks Martin. I have reinstalled the 64 bit version as it looks as if I had somehow got a 32 bit one.
John H, north east England
Lover of the old Delphi, still inexperienced with FPC/Lazarus and not an instinctive programmer

 

TinyPortal © 2005-2018