* * *

Author Topic: Upgraded FPC from 2.6.4 to 3.0.0 and now CRT unit is missing  (Read 1295 times)

richpasco

  • Newbie
  • Posts: 2
    • Richard C. Pasco
Upgraded FPC from 2.6.4 to 3.0.0 and now CRT unit is missing
« 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?
« Last Edit: December 09, 2016, 04:18:06 am by richpasco »

molly

  • Hero Member
  • *****
  • Posts: 1963
Re: Upgraded FPC from 2.6.4 to 3.0.0 and now CRT unit is missing
« Reply #1 on: December 09, 2016, 04:27:29 am »
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.

richpasco

  • Newbie
  • Posts: 2
    • Richard C. Pasco
Re: Upgraded FPC from 2.6.4 to 3.0.0 and now CRT unit is missing
« Reply #2 on: December 09, 2016, 05:16:58 am »
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
« Last Edit: December 09, 2016, 05:45:32 am by richpasco »

molly

  • Hero Member
  • *****
  • Posts: 1963
Re: Upgraded FPC from 2.6.4 to 3.0.0 and now CRT unit is missing
« Reply #3 on: December 09, 2016, 05:29:25 am »
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.

 

Recent

Get Lazarus at SourceForge.net. Fast, secure and Free Open Source software downloads Open Hub project report for Lazarus