Watch, Follow, &
Connect with Us

Please visit our new home

Public Report
Report From: Delphi-BCB/ActiveX/Type Library Editor    [ Add a report in this area ]  
Report #:  105722   Status: Closed
E2004 Identifier redeclared: 'System.Win.StdVCL'
Project:  Delphi Build #:  16.0.4429.46931
Version:    16.4 Submitted By:   david taylor
Report Type:  Basic functionality failure Date Reported:  5/18/2012 8:19:45 PM
Severity:    Serious / Highly visible problem Last Updated: 4/15/2014 6:48:00 PM
Platform:    All versions Internal Tracking #:   28367
Resolution: Fixed (Resolution Comments) Resolved in Build: : XE6
Duplicate of:  None
Voting and Rating
Overall Rating: No Ratings Yet
0.00 out of 5
Total Votes: None
Invoking the Type Library Editor's "Refresh Implementation" action erroneously
adds the "StdVCL" unit to the uses list of implementation units when the
fully qualified "System.Win.StdVCL" unit is already present. This results in
the compiler error:  E2004 Identifier redeclared: 'System.Win.StdVCL'

This problem is masked by the fact that IDE does not use fully qualified
unit names when generating COM implementation units. Updating the uses
clause to include fully qualified unit names triggers the problem apparently
since the IDE does not recognize that "System.Win.StdVCL" is the same unit
as "StdVCL".
Steps to Reproduce:
1) Start the Delphi IDE
2) File -> New -> VCL Forms Application - Delphi
3) File -> New -> Other
4) Active X -> Automation Object
5) Enter "MyClass" for the CoClass Name and press <OK>
6) Open Unit2 containing the "TMyClass" implementation class
7) Replace unit "StdVcl" with "System.Win.StdVCL" in the uses list
8) Double-click on Project1.ridl to open the Type Library Editor
9) Switch to the "design" tab of the Type Library Editor
10) Press the "Refresh Implementation" speed button
11) Compile the application

The application should compile without any errors

The compile fails with the following error message
[DCC Error] Unit2.pas(8): E2004 Identifier redeclared: 'System.Win.StdVCL'

StdVcl is erroneously added to the uses list of Unit2.pas
Use "StdVCL" in the uses list rather than "System.Win.StdVCL"

Tomohiro Takahashi at 5/21/2012 12:26:32 AM -
This report was opened with valid Internal Tracking Number.

Server Response from: ETNACODE01