Recent

Author Topic: [SOLVED] Can't compile my project after updating to LAZARUS 4.0  (Read 1260 times)

the_magik_mushroom

  • New Member
  • *
  • Posts: 22
Hello everyone,
I've moved to a new computer, installed lazarus 4.0, all my components,
but now I can't compile / view my form with F12 of my program I've been working for years now...

First I get this message when trying to view my form in the IDE:
Confirm changes
The following units will be added to the uses section of
C:\Users\User\Desktop\PROG\unit1.pas:
SynGutterBase

then I have a window FIX LFM file:


Is all these error coming from SynEdit? What can I do?
Thanks

edit: found it, I had a missing component, I think it was EncConv...

« Last Edit: July 20, 2025, 06:53:55 am by the_magik_mushroom »

the_magik_mushroom

  • New Member
  • *
  • Posts: 22
Re: Can't compile my project after updating to LAZARUS 4.0
« Reply #1 on: July 19, 2025, 10:36:03 pm »
same with version 3.8. now I'm panicking

cdbc

  • Hero Member
  • *****
  • Posts: 2599
    • http://www.cdbc.dk
Re: Can't compile my project after updating to LAZARUS 4.0
« Reply #2 on: July 19, 2025, 10:41:58 pm »
Hi
Are you maybe missing a 'syn'-package or 2, in the 'Project Inspector', under requirements?!?
Regards Benny
If it ain't broke, don't fix it ;)
PCLinuxOS(rolling release) 64bit -> KDE6/QT6 -> FPC Release -> Lazarus Release &  FPC Main -> Lazarus Main

Martin_fr

  • Administrator
  • Hero Member
  • *
  • Posts: 12075
  • Debugger - SynEdit - and more
    • wiki
Re: Can't compile my project after updating to LAZARUS 4.0
« Reply #3 on: July 20, 2025, 12:22:29 am »
line 13800....

Wow, that is a big lfm....

I don't think the errors show the correct location. Comparing with a new synedit on a form that looks normal (and loads in 4.0).
I guess that there is something wrong further up.



I don't know what you have in terms of backup. If you don't, then copy the backup folder created by Lazarus. It may just still contain something....

the_magik_mushroom

  • New Member
  • *
  • Posts: 22
Re: [SOLVED] Can't compile my project after updating to LAZARUS 4.0
« Reply #4 on: July 20, 2025, 06:58:15 am »
Quote
Wow, that is a big lfm....

Yup!

found it, I had a missing component, I think it was EncConv, so the lazarus error messages were wrong/misleading.

I'm going to be paranoid next time I change my computer, is there a simple / bulletproof way of saving all the extra components and modified files in one shot and restore everything easily?

Anyone doing it?
ChatGPT suggested to write my own script:
Code: Pascal  [Select][+][-]
  1. @echo off
  2. set LAZARUS_DIR=C:\Lazarus
  3. set PACKAGES_DIR=C:\LazarusComponents
  4.  
  5. REM Compile and install each package
  6. %LAZARUS_DIR%\lazbuild.exe %PACKAGES_DIR%\MyComponent1\MyComponent1.lpk
  7. %LAZARUS_DIR%\lazbuild.exe %PACKAGES_DIR%\MyComponent2\MyComponent2.lpk
  8.  
  9. REM Rebuild the IDE
  10. %LAZARUS_DIR%\ide\lazarus.exe --build-ide=

Warfley

  • Hero Member
  • *****
  • Posts: 2038
Re: [SOLVED] Can't compile my project after updating to LAZARUS 4.0
« Reply #5 on: July 20, 2025, 11:06:30 am »
Copy your config directory, when you upgrade lazarus it will ask you to upgrade the config, afterwards just recompile.

Or even better, instead of installing a new lazarus version, just update your existing one. E.g. using git:
Code: Bash  [Select][+][-]
  1. $> git fetch --all # load all updates
  2. $> git checkout lazarus_4_0 # Update to 4.0
  3. $> make clean lazbuild # step 1 build lazbuild
  4. $> ./lazbuild --build-ide= # step 2 build the IDE
« Last Edit: July 20, 2025, 11:09:57 am by Warfley »

 

TinyPortal © 2005-2018