[Last Call] Learn about multicloud storage options and how to improve your company's cloud strategy. Register Now

x
?
Solved

Where to call a INC file (that has compiler directives in it)?

Posted on 2011-02-10
5
Medium Priority
?
277 Views
Last Modified: 2012-05-11
Where to call a INC file that has compiler directives in it?

My INC file is like something like this:

{$DEFINE PreRelease}  
blabla    

{$IFDEF FinalRelease}
  {$OPTIMIZATION   ON}
{$ENDIF}
{$IFDEF PreRelease}
  {$OPTIMIZATION   OFF}
{$ENDIF}
blabla

Open in new window


I call this INC file in the DPR (before the main BEGIN END loop). However, the optimization is ON even if PreRelease is defined/active.
0
Comment
Question by:cubic77
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
  • 2
  • 2
5 Comments
 
LVL 32

Expert Comment

by:Ephraim Wangoya
ID: 34867119
These are compiler directives, just put the file in the first line after interface on the unit that needs them

Unit1

interface

{$I compilers.inc}
0
 

Author Comment

by:cubic77
ID: 34867160
So, you mean I need to add them all over the place? I have quite few units there.
0
 
LVL 32

Accepted Solution

by:
Ephraim Wangoya earned 2000 total points
ID: 34867204
Thats correct
0
 
LVL 38

Expert Comment

by:Geert Gruwez
ID: 34868781
add them to each unit, yes

or define them in the project
0
 

Author Comment

by:cubic77
ID: 34869848
> or define them in the project

No. This is not working. This is actually what I am doing now: "I call this INC file in the DPR (before the main BEGIN END loop)."
0

Featured Post

Free Tool: SSL Checker

Scans your site and returns information about your SSL implementation and certificate. Helpful for debugging and validating your SSL configuration.

One of a set of tools we are providing to everyone as a way of saying thank you for being a part of the community.

Question has a verified solution.

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

Have you ever had your Delphi form/application just hanging while waiting for data to load? This is the article to read if you want to learn some things about adding threads for data loading in the background. First, I'll setup a general applica…
Navigation is an important part of web design from a usability perspective. But it is often a pain when it comes to a developer’s perspective. By navigation, it often means menuing. This is less theory and more practical of how to get a specific gro…
The goal of the video will be to teach the user the concept of local variables and scope. An example of a locally defined variable will be given as well as an explanation of what scope is in C++. The local variable and concept of scope will be relat…
The viewer will be introduced to the member functions push_back and pop_back of the vector class. The video will teach the difference between the two as well as how to use each one along with its functionality.
Suggested Courses

650 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