Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Design-time package fails to build - File not found: 'Graphics.dcu'

Tags:

In Delphi XE2, I have a single control in a pair of design/run time packages. Originally, everything was working fine. I've built each of them many times already. Suddenly without warning, the design time package started complaining in one of my units that the Graphics unit is missing when I build. Graphics is a standard unit, but it's not found from this one place. I haven't even made any changes to this unit, and as far as I know, any changes that could affect this.

Here's just the uses at the top (interface) of this unit:

uses   Graphics, ColorConv, Classes, Dialogs, ZLib; 

As you can see, it's a very simple unit, and I only make very simple changes to this project. What could make it start complaining about this out of nowhere?

The strange thing is that it all works fine if I install it, it just doesn't build.

There's quite a bit of code, and I'd hate to have to post the entire thing.

like image 331
Jerry Dodge Avatar asked Jan 10 '12 00:01

Jerry Dodge


2 Answers

Wild guess: it needs the Vcl. namespace prefix?

like image 170
Francesca Avatar answered Oct 06 '22 08:10

Francesca


if there are several declaration of graphics(or other VCL units like:controls,forms ...)in your project, you can add VCL namespace to your project
as follows:

project menu-->options-->delphi compiler->>add in "unit scope names" value "Vcl" 

like image 22
Bashar Issa Avatar answered Oct 06 '22 09:10

Bashar Issa