Solved

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

Posted on 2011-02-10
5
275 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 500 total points
ID: 34867204
Thats correct
0
 
LVL 37

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

Transaction Monitoring Vs. Real User Monitoring

Synthetic Transaction Monitoring Vs. Real User Monitoring: When To Use Each Approach? In this article, we will discuss two major monitoring approaches: Synthetic Transaction and Real User Monitoring.

Question has a verified solution.

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

This article is meant to give a basic understanding of how to use R Sweave as a way to merge LaTeX and R code seamlessly into one presentable document.
The purpose of this article is to demonstrate how we can use conditional statements using Python.
The viewer will learn additional member functions of the vector class. Specifically, the capacity and swap member functions will be introduced.
The viewer will learn how to clear a vector as well as how to detect empty vectors in C++.

690 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