Forum > General

SOLVED!!! cannot comppile anything, even after uninstall and installed 2.26

(1/3) > >>

steveinalabama:
I was running version 2.2.4 which used to work, but it suddenly would not compile any prgram.
I uninstalled it, then installed version 2.2.6
The error message was "error code 1" but it stopped on {$I systemh.inc}
It still had the same error after I put the path in project options,
so I hard coded it as {$I C:\LAZARUS\FPC\3.2.2\SOURCE\RTL\INC\systemh.inc}

Then I had the same problem on
{I sysosh.inc}.
I changed the $I statement to:
{$i C:\LAZARUS\FPC\3.2.2\SOURCE\RTL\WIN\sysosh.inc}   

I tried to compile but had the same problem with another included file it did not find.
{$i rtldefs.inc}   
I changed it the same way:
C:\LAZARUS\FPC\3.2.2\SOURCE\RTL\WIN64\RTLDEFS.INC

Now I get this error message: Fatal : Unexpected end of file.
The error line is in an area of code that I did not write, under a section Thread Support
I am copying in the error line, and the lines before and after it. The error line
is the one that begines with $else...

{$i threadh.inc}
{$else not FPC_HAS_FEATURE_THREADING}
{ Bare minimum needed to get RTL to compile   

I am under Windows 10 Pro

Does anyone have a suggestion?

KodeZwerg:

--- Quote from: steveinalabama on April 09, 2023, 05:44:10 am ---Does anyone have a suggestion?

--- End quote ---
I would suggest that you remove your current version complete and use this install tool.

wp:

--- Quote from: steveinalabama on April 09, 2023, 05:44:10 am ---The error message was "error code 1" but it stopped on {$I systemh.inc}
It still had the same error after I put the path in project options,
so I hard coded it as {$I C:\LAZARUS\FPC\3.2.2\SOURCE\RTL\INC\systemh.inc}

--- End quote ---
Reading this, I get the impression that you add the path to the FPC source files to your project paths. Unless you know exactly what you are doing you should never touch the path settings in the project options in order to get access to system or third-party units. Always use the Lazarus package system for this ("Project inspector" > "Add" > "New requirement" > Select required package from the list, "OK").

Delete the folder in which the IDE writes the compiled units of your project. Cleanup the project's search path(s).

And if you want to reinstall your IDE (which I think is not required, though) just use the installer provided here. Installation on Windows is very simple, FPCUpDeluxe is not required.

steveinalabama:
Thanks for your reply. I uninstalled Lazarus again, rebooted, installed Lazarus 2.2.2 ( 2 versions back), reinstalled, rebooted, and again got the same error, stopping on  an included file, which I added the full path to the {$I ... }, tried to compile again, and had the same problem on another included file. Again I added the full path to the include file, and another compile attempt and it stopped on a 3rd  $I file.

At this point, I give up.

FWIW I am running Malwarebytes, and did a chkdsk /f and found no system problems.

wp:
Leave these paths alone. Can you compile the empty project which is created when Lazarus opens?


--- Quote from: steveinalabama on April 09, 2023, 04:44:10 pm ---FWIW I am running Malwarebytes, and did a chkdsk /f and found no system problems.

--- End quote ---
It is always a good idea to add the Lazarus and the project folder to the white-list of the anti-virus scanner. AV software may be very aggressive towards little-known software such as Lazarus/FPC etc.

Navigation

[0] Message Index

[#] Next page

Go to full version