Problem with "Unit scope names"

TeeChart VCL for Borland/CodeGear/Embarcadero RAD Studio, Delphi and C++ Builder.
Post Reply
Marcelo
Newbie
Newbie
Posts: 3
Joined: Wed Feb 01, 2012 12:00 am

Problem with "Unit scope names"

Post by Marcelo » Wed Jun 06, 2012 12:11 pm

Hi,

I think I have a problem with "Unit scope names" using the VCLTee scope.

When I create a new VCL Form Application with C++ Builder XE2 (Pro) and drag a TChat to the main form, I got these headers:

Code: Select all

#include <VCLTee.Chart.hpp>
#include <VCLTee.TeEngine.hpp>
#include <VCLTee.TeeProcs.hpp>
I can compile and run the project, normally. So I think the Include and Library paths are OK.

So I include VCLTee into the "Unit scope names" using "Project|Options|Delphi Compiler" and "All configurations - 32bit" target.

I change the TeeChart include header files to:

Code: Select all

#include <Chart.hpp>
#include <TeEngine.hpp>
#include <TeeProcs.hpp>
And finally I got this error message:

[BCC32 Error] FormMain.h(10): E2209 Unable to open include file 'Chart.hpp'
[BCC32 Error] FormMain.h(11): E2209 Unable to open include file 'TeEngine.hpp'
[BCC32 Error] FormMain.h(12): E2209 Unable to open include file 'TeeProcs.hpp'

I hope someone could help me with this subject.

Thanks.

Marcelo.

Yeray
Site Admin
Site Admin
Posts: 9602
Joined: Tue Dec 05, 2006 12:00 am
Location: Girona, Catalonia
Contact:

Re: Problem with "Unit scope names"

Post by Yeray » Thu Jun 07, 2012 8:26 am

Hi Marcelo,

I understand from here and here, that adding the "VCLTee" prefix in the list at "Tools->Options->Environment Options->Delphi Options->Library->Unit scope names" should work for the C++Builder projects. But it doesn't (at least for us here).

The way to go with this will probably be the same we've seen Embarcadero is actually using. If you look at the IDE "include\windows\vcl" path, you'll find, ie, Forms.hpp and Vcl.Forms.hpp. If you open Forms.hpp, you'll see it is actually a redirection to the Vcl.Forms.hpp:
Forms.hpp wrote:#include <Vcl.Forms.hpp>
So we'll duplicate all the units, the units without prefix redirecting to the units with the prefix. This will allow you to use the units without prefix in your applications, as always.

Here you have Chart.hpp, TeEngine.hpp and TeeProcs.hpp. Put them in the "Delphi16.win32\Include" folder in the TeeChart installation.
Redirections.zip
(511 Bytes) Downloaded 542 times
Best Regards,
ImageYeray Alonso
Development & Support
Steema Software
Av. Montilivi 33, 17003 Girona, Catalonia (SP)
Image Image Image Image Image Image Please read our Bug Fixing Policy

Post Reply