Page 1 of 1

Problem with "Unit scope names"

Posted: Wed Jun 06, 2012 12:11 pm
by 16461457
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.

Re: Problem with "Unit scope names"

Posted: Thu Jun 07, 2012 8:26 am
by yeray
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