Forum > Windows (32/64)

Errors when switching to 64 bit


I'm trying to generate a Windows 64 bit application using the following Lazarus version.

Version 2.0.10
FPC Version 3.2.0

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.



--- Quote from: TyneBridges on January 08, 2021, 08:22:46 pm ---"The project uses target OS=Win64 and CPU=i386. T

--- End quote ---
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.

Thanks Martin. I have reinstalled the 64 bit version as it looks as if I had somehow got a 32 bit one.


[0] Message Index

Go to full version