Wuddin
Wuddin

Reputation: 29

recompile/rebuild Delphi 5 code using .dpr file

I am trying to recompile/rebuild an old application program developed on Delphi5. I used the same Delphi5 software on an XP computer. I did some minor corrections to the codes of a couple of forms and units. When I recompile using the .dpr file it comes with a fatal message: File not found System.pas
I added in .dpr file on the link path to this file BP folder. No success and the same message. Any clue will help.

Upvotes: 2

Views: 1429

Answers (4)

MikeD
MikeD

Reputation: 637

The "File not found System.pas" error often isn't really because it can't find system.pas. It's some other problem that manifests as this error.

It can be:

  1. Duplicate Path entries in the Library Path.

  2. Too many entries in the Library Path - I think the limit is 99.

  3. Path to a package in Library Paths too long.

  4. Path to a package in Library Paths corrupt.

  5. Environmental Variables not set correctly.

and possibly more if you Google "system.pas not found"

Upvotes: 2

Thaddy
Thaddy

Reputation: 131

Marjan is right. But also add ${DELPHI}\LIB\OBJ

If you still have a dcc32.cfg with the project, or a .cfg with the project, open it up to see if the settings in there are correct. Otherwise delete the .cfg or edit it to reflect the proper path to the bin and bin\obj directories.

Upvotes: 1

kludg
kludg

Reputation: 27493

Probably Library Path is broken after running some buggy component installer. In modern IDE's look for Tools -> Options -> Library -> Library Path from main menu (should be slightly different for Delphi 5).

System.dcu file lives in $(BDS)\Lib path for Delphi 2007.

Upvotes: 2

Warren  P
Warren P

Reputation: 68922

A .dpr file is the main project file for a Delphi 2,3,4,5,6,7 project.

You have not given any details like WHAT WAY OF BUILDING SOMETHING of delphi you're using (the code is Delphi 5 level code, but you are not telling me for example, if you built the project inside the Delphi IDE or from the command line compiler DCC32), and what other files you have installed. You haven't mentioned if the library paths and so on are configured (either for the IDE, or for the command line environment, both of which are separate tasks).

An inability to find System.pas suggests to me that you might be running the command line compiler (Dcc32) instead of the IDE to build the project, and you have forgotten to mention that. That usually means you have to set up the Options (dcc32.dof) file for Delphi, so that command line building with Dcc32 can work.

What exactly do you mean by "When I compile with the .dpr file"? Instead of making people guess, show the commands you typed, exactly, and the error message, exactly. If it helps, use screenshots or text grabs.

Upvotes: 0

Related Questions