Forum > Windows (32/64)

[SOLVED] Lazarus version 2.0.12 under 32-bit win can't compile anything.

(1/2) > >>

I really hope somebody here might know how to solve it.

I couldn't find any solution so far in the internet. I made a program on a Win 64 bit system but couldn't get the cross compiler to work, so I tried to cheat my way out, by simply getting Lazarus for 32 bit system on another device.

But this version kinda acts up, no matter, what I try to compile (empty form with no code, an example from Lazarus, or my project that works perfectly, on the 64 bit Lazarus).
The new device never had Lazarus, so no old ghosts screwing things up.

The error always happens to be (with different position depending on the project, I try to compile):

"fpcadds.pas(25,32) Fatal: Can't find unit FPCAdds used by LazUTF8"

In my opinion such an error should be impossible for a not modified installation of an IDE.
So how can I solve it? It says it can't find what Lazarus would expect it to find at that point. So it should be solvable with settings/ Linker and so on?
And if so, how do I do it?

I hope somebody knows a solution.

Thank you, for your time. :)


Edit: Solved issue.

Let me repeat to make sure that I understand correctly:

You installed a 32-bit version of Lazarus 2.0.12 onto a Win64 system which never had seen Lazarus before, but you cannot compile even the simplest project?

I am working on such a system, and do not have any problems with it. It's hard to say from the distance what's wrong in your case. Maybe the simplest advice of all: uninstall Lazarus, delete the folder with your user settings (by default c:\users\<your name>\appdata\local\Lazarus). Re-download the installation file. Make sure to pick the correct one. Since you are on a 64-bit system the installer proposes to you by default the 64-bit Lazarus but you want the 32-bit version (but the 64-bit version is working correctly, too, so it would not be harmful to pick the wrong one). The download for the 32 bit version is, the one for the 64 bit version is

You mentioned cross-compilation. Do you mean that you have a 64-bit version on your other system and want to cross-compile 32-bit applications from it? Cross-compilation always has been too complicated for me (to many changes in the setup). Therefore, when I want a 64-bit and a 32-bit binary from the same source I simply install the other Lazarus in addition to the first one - harddisk spaces costs nothing nowadays. If you want to have several Lazarusses on the same system you should select the option "Secondary installation" in the installer (I think, in the second screen of the installer). In the next screen you must specify a folder for your user settings - I have a d:\LazConfigs with subfolders for each version (e.g. d:\LazConfigs\Laz2.0.12-fpc3.2.0-32bit, d:\LazConfigs\Laz2.0.12-fpc3.2.0-64bit, etc). Deny the question to register file types in the Windows registry because you never can be sure that the version of Lazarus that you have in mind opens the double-clicked pas or project file).

I agree with WP:
Have the same setup here (Win10-64Bit running 32-Bit Laz2.0.12/FPC3.2.0).
No Problems whatsoever.
Installation from official setup-files pointed to by wp

Cross-compiling from win32 to win64 is ridiculously easy when you have a setup with just Lazarus 32 bit installed.
All you need to do is install the win32 to win64 fpc cross compiler.
For fpc 3.2 this would be fpc-3.2.0.i386-win32.cross.x86_64-win64.exe.

When you run the installer, tell it to install in the same folder as your current fpc 3.2 compiler.

After that, from within Lazarus you can select (in Project->Compiler Options, (Shift-F11 is the shortcut IIRC)) to compile for Windows-64 with X86_64 processor.
It is as easy as that.

If you need to do this regularly, then make a build mode for Win64 (and include that in your default compiler options for Lazarus). Then you can select  the correct target with a simple mouse click.


You "cross compile to win 32 bits"

So that means you downloaded
from (the "Lazarus Windows 64" folder)

And then you downloaded

You installed the first, into an empty folder?
While installing over an existing installation works in 99% of all cases, that is not guaranteed.
Keeping and upgrading previous config does work.

You then installed the 2nd into the same folder as the first?
You may have gotten a warning, that the folder was not empty. That must be ignored. (Known issue, but needs time....)

If that is the case, then you created a new project.

In "project options" under target, you did change the following two entries
- Target OS: win32
- Target CPU: i386

installing over an existing installation

If you did install over an existing installations you may be able to fix this, with either of the following 2 methods.

1) Menu: Tools > Configure build lazarus
Make sure to check "Clean all" and then hit build.

2) In the windows explorer, in you install directory, search for files.
  search for *.ppu 
  search for *.o
Both times sort the result list by "type" and delete all files with the exact extension .ppu and .o 
(there are other files found (like .obj) that should be kept)

If the above does not help, then right click the "messages window" (where the error is shown), and from the context menu select
  copy > copy all/original messages to clipboard
Then paste and post the content here.


[0] Message Index

[#] Next page

Go to full version