[DCC Fatal Error] RegExpr.pas(1): F1027 Unit not found: 'System.pas' or binary equivalents (.dcu) C++ Builder 2009

Hi All,

Running the latest version of C++ Builder 2009 pro.

I can create a project and it compiles fine. If a then add any .pas file
to the project I always get the following error (in this example it was
the RegExpr.pas file, but any .pas added to the project causes it:

[DCC Fatal Error] RegExpr.pas(1): F1027 Unit not found: 'System.pas' or
binary equivalents (.dcu)

I have not knowingly changed any compile settings and system.pas exists
and is in the paths.

Any ideas?

Thanks muchly,

Phil.
0
Phil
7/16/2009 10:28:05 PM
embarcadero.cppbuilder.ide 2180 articles. 1 followers. Follow

3 Replies
1453 Views

Similar Articles

[PageSpeed] 43

Hello,

Phil Read wrote:

> system.pas exists and is in the paths.

that's the problem. You should never have the VCL/RTL source paths in
your search path. You cannot simply recompile System.pas, and I doubt
you really want it. If you want to change a certain part of the VCL,
copy the relevant source file somewhere else and add it to your project.

-- 
Moritz

"Hey, it compiles! Ship it!"
0
Moritz
7/17/2009 7:26:37 AM
Hi Moritz,

Sorry I didn't mean it was in the search paths, I meant the standard 
settings are all correct in the search paths.

Infact I can take the project on my other PC with the same version of 
C++ Builder 2009 and adding a .pas to my project (such as RegExpr.pas) 
compiles perfectly and I'm up and running.

I spent quite some time comparing the environment options and they are 
identical, so I am completely puzzled as to WHY this error occurs.

Thanks,

Phil.


Moritz Beutel <Moritz Beutel wrote:
> Hello,
> 
> Phil Read wrote:
> 
>> system.pas exists and is in the paths.
> 
> that's the problem. You should never have the VCL/RTL source paths in
> your search path. You cannot simply recompile System.pas, and I doubt
> you really want it. If you want to change a certain part of the VCL,
> copy the relevant source file somewhere else and add it to your project.
>
0
Phil
7/17/2009 11:35:45 AM
Problem Workaround!!!

I worked out something is stopping the .dcu and .obj files from being
created by the dcc32.exe so I ran it from the command line instead and
then copied the 2 files into my projects folder. Then it all compiles.

I wonder if it's anything to do with VISTA, it kicked up a fuss about
not finding the Debug folder which was there and running dcc32.exe from
the command line proved it works.

Anyway that at least helps me get on with the job at hand.

Moritz Beutel <Moritz Beutel wrote:
> Hello,
> 
> Phil Read wrote:
> 
>> system.pas exists and is in the paths.
> 
> that's the problem. You should never have the VCL/RTL source paths in
> your search path. You cannot simply recompile System.pas, and I doubt
> you really want it. If you want to change a certain part of the VCL,
> copy the relevant source file somewhere else and add it to your project.
>
0
Phil
7/17/2009 12:09:47 PM
Reply: