Lazarus
Free Pascal => Windows => Topic started by: Rich Pasco on December 09, 2016, 04:10:24 am
-
I recently upgraded FPC from 2.6.4 to 3.0.0 as follows:
1. Download and ran the executable fpc-3.0.0.i386-win32.exe
2. Replaced all references to 2.6.4 in my PATH with 3.0.0
Now, when I try to re-compile my existing programs, I get the error message:
"Fatal: Can't find unit CRT used by Program"
Sure enough
C:\FPC\2.6.4\units\i386-win32\rtl\crt.o
and
C:\FPC\2.6.4\units\i386-win32\rtl\crt.ppu
exist but there are no couterparts in
C:\FPC\3.0.0\units\i386-win32\rtl
Was the CRT unit deliberately deleted from 3.0.0, or what did I do wrong?
-
unit crt can be found inside directory rtl-console.
Try to compile your project with -va and see what fpc.cfg file was used (as well as which paths are defined to locate your units). Analyzing -va output usually holds the answer.
-
Thanks, molly.
I was using a custom FPC.CFG file. Switching to the installer-generated
C:\FPC\3.0.0\bin\i386-win32\fpc.cfg
fixed that.
But now I have a new fatal error:
"Destructors cannot have parameters"
Since when? The offending source line was
destructor close(commit: Boolean);
It worked with 2.6.4 but is flagged in 3.0.0. Why?
UPDATE: It's because I lost my -So switch. See item 16 here:
http://www.freepascal.org/docs-html/3.0.0/user/usersu82.html
-
UPDATE: It's because I lost my -So switch.
http://www.freepascal.org/docs-html/3.0.0/user/usersu82.html
You was quicker than me , as i just found the reason just like you :)
fwiw: you can still use your custom fpc.cfg but, you simply have to make sure the paths are all correct for your 3.0 installation.