Solved

Conditionnal Compiling

Posted on 1998-04-27
3
129 Views
Last Modified: 2010-04-06
Hi.
     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...)
0
Comment
Question by:roblam
  • 2
3 Comments
 
LVL 8

Accepted Solution

by:
ZifNab earned 200 total points
ID: 1337244
Hi roblam,

Normally this should do :

{$DEFINE ROBLAMSNEEDS}

Then in your code use it like this :

{$IFDEF ROBLAMSNEEDS}
all your code
{$ENDIF}

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

{$I RoblamsDefines.pas}

unit .....

Regards, ZiF.  
0
 

Author Comment

by:roblam
ID: 1337245
Thanks!!

The {$I RoblamDefines.pas} works fine.

0
 
LVL 8

Expert Comment

by:ZifNab
ID: 1337246
My pleasure. c.u. Zif.
0

Featured Post

What Should I Do With This Threat Intelligence?

Are you wondering if you actually need threat intelligence? The answer is yes. We explain the basics for creating useful threat intelligence.

Join & Write a Comment

The uses clause is one of those things that just tends to grow and grow. Most of the time this is in the main form, as it's from this form that all others are called. If you have a big application (including many forms), the uses clause in the in…
Introduction I have seen many questions in this Delphi topic area where queries in threads are needed or suggested. I know bumped into a similar need. This article will address some of the concepts when dealing with a multithreaded delphi database…
In this seventh video of the Xpdf series, we discuss and demonstrate the PDFfonts utility, which lists all the fonts used in a PDF file. It does this via a command line interface, making it suitable for use in programs, scripts, batch files — any pl…
Illustrator's Shape Builder tool will let you combine shapes visually and interactively. This video shows the Mac version, but the tool works the same way in Windows. To follow along with this video, you can draw your own shapes or download the file…

708 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

14 Experts available now in Live!

Get 1:1 Help Now