Unit scoping

TeeChart VCL for Borland/CodeGear/Embarcadero RAD Studio, Delphi and C++ Builder.
Post Reply
PoLabs
Newbie
Newbie
Posts: 13
Joined: Tue Aug 04, 2015 12:00 am

Unit scoping

Post by PoLabs » Mon Sep 14, 2015 3:53 pm

Hi,

I hope this is the right place to ask. I am using Delphi XE8 and I have VCL application.

When I added VCLTee prefix to Unit Scope Names in Project options, compiler still reported missing units if I use it:
uses TeEngine -> 'TeEngine.pas' cannot be found!

Then I added VCLTee prefix in Tools->Environmental settings->Delphi Options -> Library and compiling was succesful. Why is it so?

I expected it would be enough to add VCLTee prefix in Project Options. I read XE8 help about unit scoping but I am still a bit confused. On the other hand I would like to keep this settings on project level not as general environmental settings.

Can you tell what am I doing wrong?

Thank you in advance.

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

Re: Unit scoping

Post by Yeray » Tue Sep 15, 2015 10:10 am

Hello,
PoLabs wrote:When I added VCLTee prefix to Unit Scope Names in Project options, compiler still reported missing units if I use it:
uses TeEngine -> 'TeEngine.pas' cannot be found!
I'm not sure why this happens; it works fine for me.
Note there are several "Target"s to select. Maybe you added the prefix to a different configuration/platform than the one you are compiling against.
If I add "VCLTee" to the "All configurations - All platforms" target, a new VCL Delphi project with a chart on the form builds fine for both Win32&Win64 and both Debug&Release modes, even if I remove the "VCLTee" prefix from all the units in the uses clause.
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

PoLabs
Newbie
Newbie
Posts: 13
Joined: Tue Aug 04, 2015 12:00 am

Re: Unit scoping

Post by PoLabs » Tue Sep 15, 2015 10:26 am

My current project doesn't include path to precompiled units of TeeChart in Search path because I am setting it up in Library. So I have to add VCLTee to Unit Scope in Library settings. Which makes sense now. That way I never recompile TeeChart sources because they are already.

I made a small demo which explained me the difference. But thank you for your effort anyways.

kind regards

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

Re: Unit scoping

Post by Yeray » Wed Sep 16, 2015 9:30 am

Hi,

I'm glad to hear you found the complete explanation!
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