Watch, Follow, &
Connect with Us
Public Report
Report From: Delphi-BCB/Compiler/Delphi/Header Generation    [ Add a report in this area ]  
Report #:  122996   Status: Closed
[Regression in XE5] Incorrect using statement in generated HPP
Project:  C++Builder Build #:  19.0.14356.6604
Version:    19.2 Submitted By:   Clayton Arends
Report Type:  Basic functionality failure Date Reported:  3/6/2014 5:04:58 PM
Severity:    Serious / Highly visible problem Last Updated: 4/15/2014 6:16:03 PM
Platform:    All versions Internal Tracking #:   48330
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
Description
Delphi compiler is generating typedefs slightly differently in XE5 than in previous versions.
Some of the generated "using" statements are invalid.
Steps to Reproduce:
1. Set project options to generate all C++Builder files

2. Add a .pas file

3. Include these lines
---------
  type
    PWideChar = System.PWideChar;
---------

4. Build the C++Builder proejct

5. Look at the generated .hpp file

expected:
  using System::PWideChar;
-or-
  typedef System::WideChar * PWideChar;

actual:
  using System::WideChar *;
Workarounds
If you have access to the Delphi source then emit the correct type:

  {$NODEFINE PWideChar}
  (*$HPPEMIT 'namespace Filename'*)
  (*$HPPEMIT '{'*)
  (*$HPPEMIT '  using System::PWideChar;*)
  (*$HPPEMIT '}'*)

If you don't have access to the Delphi source then you can edit the .hpp and correct the bad lines.
Attachment
None
Comments

None

Server Response from: ETNACODE01