ARM Technical Support Knowledge Articles

USING DEFINE TO SPECIFY AN #INCLUDE FILE

Applies to: General Topics

Answer


Information in this article applies to:


QUESTION

I want to use the #include command with a filename that is specified with the compiler DEFINE directive. Is this possible? What is the correct syntax for the DEFINE directive?

ANSWER

Yes, this is possible, just use the following syntax in your C source code:

#include DATA_H

In µVision you may just enter under Options for Target - C51 - Define:

DATA_H="<filename.h>"

If you are using the compiler on the command line, you may write:

C51 source.c DEFINE(DATA_H="<filename.h>")

Article last edited on: 2004-05-01 15:20:41

Rate this article

[Bad]
|
|
[Good]
Disagree? Move your mouse over the bar and click

Did you find this article helpful? Yes No

How can we improve this article?

Link to this article
Copyright © 2011 ARM Limited. All rights reserved. External (Open), Non-Confidential