Watch, Follow, &
Connect with Us

Please visit our new home

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
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
    PWideChar = System.PWideChar;

4. Build the C++Builder proejct

5. Look at the generated .hpp file

  using System::PWideChar;
  typedef System::WideChar * PWideChar;

  using System::WideChar *;
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.


Server Response from: ETNACODE01