pop33
pop33

Reputation: 135

Delphi can't find System.dcu; what should the default path settings be?

Got this error whenever I try to compile something: "F1027 Unit not found: 'System.pas' or binary equivalents (.dcu)".

Got it after installing a component, removed it, reinstalled RAD studio, but still same.

In order to get it fixed, I need the Library path and browsing path. Please anybody post yours so I get it working.

A workaround I found is including the path "$(BDS)\lib\win32\debug" to Library path, but this is not the correct way. So I need your paths. Thanks!

Upvotes: 12

Views: 22893

Answers (6)

SAM
SAM

Reputation: 1

I had this same issue and after browsing the solutions here and trying them it still persisted.

I eventually tracked it down to one of the components installed had inserted invalid paths into the library path.

The offending components in my case came from TMS.

After I corrected the paths (they had a ./ inserted in them, which I removed) everything worked as it should.

Example: C:\sourcecode\tmssoftware\TMS\Sphinx\packages\d11\Win32\Release

was

C:\sourcecode\tmssoftware\TMS\Sphinx\packages\d11.\Win32\Release

Removed the .\ and all worked fine.

Upvotes: 0

Cr0c_rus
Cr0c_rus

Reputation: 11

For XE4 use this restore.reg

Windows Registry Editor Version 5.00

[HKEY_CURRENT_USER\Software\Embarcadero\BDS\11.0\Library\Win32]

"Search Path"="$(BDS)\Imports;$(BDSCOMMONDIR)\Dcp;$(BDS)\include;C:\Program Files (x86)\Embarcadero\RAD Studio\11.0\lib;C:\Program Files (x86)\Embarcadero\RAD Studio\11.0\include;C:\Program Files (x86)\Embarcadero\RAD Studio\11.0\Imports;$(BDSLIB)\$(Platform)\release;$(BDSUSERDIR)\Imports;$(BDS)\Imports;$(BDSCOMMONDIR)\Dcp\$(Platform);$(BDS)\include"

You can change 11.0 to your version of Delphi

Upvotes: 1

user998198
user998198

Reputation: 133

Take a look at the -cleanregistryide option on this page:

http://support.embarcadero.com/es/article/42597

It will allow you to restore the IDE's default installation paths. If you use this option, third-party add-in's would need to be reinstalled. I have experienced this problem after upgrade installations when there were installed 3rd party IDE tools.

HTH Navid

Upvotes: 4

scottostanek
scottostanek

Reputation: 161

Top Line of the library path:

$(BDSLIB)\$(Platform)\release

Some installers mistakenly parse this as two lines and split them out.

Upvotes: 11

Patrick Moloney
Patrick Moloney

Reputation: 642

Check on your Delphi IDE menu: Tools * Options, to see what is defined. My default installation has 2 important "Environment Variables", BDSLIB, defined as "c:\program files\embarcadero\rad studio\8.0\lib" Platform, defined as "Win32".

On that same form, under Library, is defined Library path:, the path begins "$(BDSLIB)\$(Platform)\release;...

That should equate to C:\program files\embarcadero\rad studio\8.0\lib\Win32\release", which is where you should find System.dcu. Make sure that file is there. Maybe it was removed or damaged by your component work. There is also a "Debug" directory under Win32 which should have the dcu with the debug information included. If the release dcu is missing or damaged, you can probably copy the debug version in as a quick test.

It sounds like the compiler couldn't find the dcu then also looked for the source file to recreate it. But it should normally use the dcu.

I believe the source is in PF\Embarcadero\Rad Studio\8.0\source\rtl\sys as system.pas.

All of the above is the default Delphi Options. The options can also be changed for a project, which could interfere with the above. Try the above first. Then create a new project and see if it will complile, as that will use the defaults only.

Patrick New York

Upvotes: 5

Ken White
Ken White

Reputation: 125689

This is from the HKLM\Software\Embarcadero\BDS\8.0\Library key in the registry - you can save it to a .reg file and then import it (making any necessary fixes to the paths first, of course):

Windows Registry Editor Version 5.00

[HKEY_LOCAL_MACHINE\SOFTWARE\Embarcadero\BDS\8.0\Library]
"Browsing Path"="$(BDS)\\SOURCE\\VCL;$(BDS)\\source\\rtl\\common;$(BDS)\\SOURCE\\RTL\\SYS;$(BDS)\\source\\rtl\\win;$(BDS)\\source\\ToolsAPI;$(BDS)\\SOURCE\\IBX;$(BDS)\\source\\Internet;$(BDS)\\SOURCE\\PROPERTY EDITORS;$(BDS)\\source\\soap;$(BDS)\\SOURCE\\XML;$(BDS)\\source\\db;$(BDS)\\source\\Indy10\\Core;$(BDS)\\source\\Indy10\\System;$(BDS)\\source\\Indy10\\Protocols;$(BDS)\\source\\database;"
"Debug DCU Path"="$(BDSLIB)\\$(Platform)\\debug;$(BDS)\\RaveReports\\Lib"
"HPP Output Directory"="$(BDSCOMMONDIR)\\hpp"
"Language Library Path"="$(BDSLIB)\\$(Platform)\\release\\$(LANGDIR);$(BDS)\\lib\\$(LANGDIR)"
"Package DCP Output"="$(BDSCOMMONDIR)\\Dcp"
"Package DPL Output"="$(BDSCOMMONDIR)\\Bpl"
"Package Search Path"="$(BDSCOMMONDIR)\\Bpl"
"Translated Debug Library Path"="$(BDSLIB)\\$(Platform)\\debug\\$(LANGDIR)"
"Translated Library Path"="$(BDSLIB)\\$(Platform)\\release\\$(LANGDIR)"
"Translated Resource Path"="$(BDSLIB)\\$(Platform)\\release\\$(LANGDIR)"
"Search Path"="$(BDSLIB)\\$(Platform)\\release;$(BDSUSERDIR)\\Imports;$(BDS)\\Imports;$(BDSCOMMONDIR)\\Dcp;$(BDS)\\include;C:\\Program Files\\Raize\\CS4\\Lib\\RS-XE;;$(BDS)\\RaveReports\\Lib"

For MSBuild to work properly (and for project configurations), you need to make sure the following environmental variable is set properly:

PLATFORM=ANYCPU

Upvotes: 14

Related Questions