Forum > Options

Upgrade Lazarus, nothing compiles

<< < (2/3) > >>

Curiously, I have no duplication between LazUtils and LCLBase directories. The former looks like the source and the latter the compiled version. I have no *.ppu files in the former, only the latter.


You had hard coded paths, whilst mine contained undocumented variables - that may be the reason.

Occasionally an external unit has recompiled during compilation of my projects.

Looks like it is a file compare of .pas, .pp & .ppu. More chances to stuff things up.

Looks like it is best to remove Lazarus before upgrade.

Thanks for your help.

Easy using "Search Everything".

I just added an extension of .was to offending files. Some were dated 2013 or 2015.


--- Quote from: Bazzao on September 29, 2020, 10:45:22 am ---You had hard coded paths, whilst mine contained undocumented variables - that may be the reason.

--- End quote ---
Just that you don't know $(FPCVER) does not mean that it is "undocumented":

My Laz 2.0.10 installation has a hardcoded path only in "Tool" > "Options" > "Environment" > "Compiler executable". Macros are used in "FPC source directory" ($(LazarusDir)fpc\$(FPCVer)\source) and "Make executable" ($Path($(CompPath))\make.exe), and they perfectly make sense here. Note that the "Compiler" command in "Compiler Options" > "Compiler commands" of the project settings should be $(CompPath) -- otherwise you have a hard-to find issue when the compiler is not doing what you want.

With these settings you can easily switch between fpc versions by adjusting the "Compiler executable" only.

The duplicate units messages are probably due to the fact that some units were moved between packages between Laz 3.0.2 and 3.2.0, but you installed over the old Laz version. You can try to do a clean rebuild of the IDE which erases all ppu folders: "Tools" > "Configure "Build Lazarus"" > Check "Clean all" and "Switch after building to automatically" in the "Cleanup box". Then "Build". This may take some time, but it is definitely shorter than a complete new installation (which is another option, since installation of Lazarus on Windows is very easy).

For the next time when you do an "upgrade" I recommend a "secondary" installation, which leaves the old installation untouched. This way you have two (or more) Lazarus installations on your disk, and you can slowly check which features of the new version require changes in your projects. But keep in mind that the new IDE may introduce new properties in the lfm files which make it difficult to re-open that project in the old IDE. Always have a backup copy of your projects at hand when you work with different Lazarus/FPC versions. In order to create a "secondary" installation check this box in one of the first screens of the installer; define a directiory for your user settings (otherwise the settings will be mixed with those of the old IDE); do not register any file types with Windows.


Thanks for the links. All is explained in lengthy way but gives no indication of how to obtain current values.

Look at it from my point of view, as a novice in some areas. I previously considered upgrading Lazarus and looked at comments about removing old versions. So I delayed. Then I came into the problem of creating a 32bit application for an XP-VM, so I needed that add-on. And that meant upgrading.

So I upgraded and found nothing would work. The project I was working on was not the only project. Every project was dead in the water until all the issues were resolved.

The two Options boxes are frustrating. Whilst there is help, it is laborious especially when time is short.

To cut the discussion short. A feature in the IDE would be that wherever there are options that accept macros is have 2 additional user boxes and a button. The user can copy a macro-item from an option and paste it into the first box, press a button to decode the macro and present the user with a result in the second box.

Eg you paste:
and it returns with
in the following box.

I would like to see the above implemented in the next release of Lazarus. It would not take too much to include.

An alternative would be to grab all options that allow a macro, whether it is used or not, and list them in a text box in the following format:
* Prompt
* Current text
* Decoded text
* (blank line)

One replyer showed he hard coded his options. Perhaps he too was frustrated. I wonder how many users hard-code their options.

Anyway I am killing off the now corrupted Lazarus, and restarting with the new version. This I cannot start for a few days.

I say to all uninstall before upgrade.


[0] Message Index

[#] Next page

[*] Previous page

Go to full version