Conditionnal Compiling

Posted on 1998-04-27
Last Modified: 2010-04-06
     I'm using Delphi 2.0, and I'd like to define a GLOBAL conditional symbol ({$DEFINE})... What should I do?

(Note: I already tried the Project|Options|Conditionnal Defines, and it doesn't work. I tried the /D command-line option, doesn't work either...)
Question by:roblam
  • 2

Accepted Solution

ZifNab earned 200 total points
ID: 1337244
Hi roblam,

Normally this should do :


Then in your code use it like this :

all your code

You could also create a PAS file with all your conditional defines and then use

{$I RoblamsDefines.pas}

unit .....

Regards, ZiF.  

Author Comment

ID: 1337245

The {$I RoblamDefines.pas} works fine.


Expert Comment

ID: 1337246
My pleasure. c.u. Zif.

Featured Post

Is Your Active Directory as Secure as You Think?

More than 75% of all records are compromised because of the loss or theft of a privileged credential. Experts have been exploring Active Directory infrastructure to identify key threats and establish best practices for keeping data safe. Attend this month’s webinar to learn more.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

Suggested Solutions

Title # Comments Views Activity
Thread safe  opinion 7 126
Wininet read php file from internet issue 6 81
Mydac connection data base issue 3 139
TServerSocket - file via sendbuf or Text via sendtext ? 1 42
This article explains how to create forms/units independent of other forms/units object names in a delphi project. Have you ever created a form for user input in a Delphi project and then had the need to have that same form in a other Delphi proj…
Creating an auto free TStringList The TStringList is a basic and frequently used object in Delphi. On many occasions, you may want to create a temporary list, process some items in the list and be done with the list. In such cases, you have to…
Internet Business Fax to Email Made Easy - With  eFax Corporate (, you'll receive a dedicated online fax number, which is used the same way as a typical analog fax number. You'll receive secure faxes in your email, f…
Both in life and business – not all partnerships are created equal. As the demand for cloud services increases, so do the number of self-proclaimed cloud partners. Asking the right questions up front in the partnership, will enable both parties …

912 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question

Need Help in Real-Time?

Connect with top rated Experts

15 Experts available now in Live!

Get 1:1 Help Now