Compiler directives

Hello

I have an application with many units.

I Want to declare my Compiler directive (as {$DEFINE name}in Main unit and access it from any unit.

How can I do it?

Thanks



pmarkovAsked:
Who is Participating?

Improve company productivity with a Business Account.Sign Up

x
 
robert_marquardtConnect With a Mentor Commented:
Make a separate include file (something like Directives.INC) and include it with ($INCLUDE Directives.INC) in all your files.
0
 
DrDelphiCommented:
I am fairly certain that you can't do that with a {$Define}... have you considered using a global variable, instead?




Good luck!!
0
 
DrDelphiCommented:
*bows to robert_marquardt * Good show!!
0
 
AloneCommented:
... or try to enter them into the "Conditional defines" line in project options dialog

WBR...
0
 
pmarkovAuthor Commented:
Alone,

What does "the "Conditional defines" line " mean?


Robert - may be this is the correct answer :))

Thanks for everybody
0
Question has a verified solution.

Are you are experiencing a similar issue? Get a personalized answer when you ask a related question.

Have a better answer? Share it in a comment.

All Courses

From novice to tech pro — start learning today.