Keil Logo

GENERAL: USING DEFINE TO SPECIFY AN #INCLUDE FILE


Information in this article applies to:

  • C51 Version 6
  • C51 Version 7
  • C251 Version 3
  • C166 Version 4
  • C166 Version 5

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>")

Last Reviewed: Saturday, May 1, 2004


Did this article provide the answer you needed?
 
Yes
No
Not Sure
 
  Arm logo
Important information

This site uses cookies to store information on your computer. By continuing to use our site, you consent to our cookies.

Change Settings

Privacy Policy Update

Arm’s Privacy Policy has been updated. By continuing to use our site, you consent to Arm’s Privacy Policy. Please review our Privacy Policy to learn more about our collection, use and transfers
of your data.