CX51 用户手册----INCDIR 伪指令

来源:互联网 发布:软件开发行业分析 编辑:程序博客网 时间:2024/05/30 23:09

声明:

1、本翻译仅供个人学习使用,本人没有提供技术支持的义务,也不承担由此引发的任何后果。

2、请勿用于商业用途。

3、英文来自:http://www.keil.com/support/man/docs/c51/。

4、欢迎大家共同与我交流探讨(290207203@qq.com)。

INCDIR Compiler Directive

Abbreviation

None.

Arguments

Path specifications for include files enclosed in parentheses.

Default

None.

µVision

Options — C51 — Include Paths.

Description

The INCDIR directive specifies the location of the compiler include files. The compiler accepts a maximum of 512 path declarations. If more than one path declaration is specified the path names must be separated by semicolons.

Include files enclosed within double quote characters ('"') are searched for in the following folders in order:

  • The current folder.
  • The source file folder.
  • Paths specified by the INCDIR directive.
  • Paths specified by the C51INC environment variable.

Include files enclosed within angle bracket characters ('<>') are searched for in the following folders in order:

  • Paths specified by the INCDIR directive.
  • Paths specified by the C51INC environment variable.
Example
C51 SAMPLE.C INCDIR(C:\MYINC;C:\CHIP_DIR)

 Related Knowledgebase Articles

  • GENERAL: DIFFERENCES BETWEEN #INCLUDE <FILE> AND "FILE"
  • C51: UNABLE TO FIND INCLUDE FILES USING LONG DIRECTORY NAMES
  • C51: SPECIFYING HEADER PATHS FROM THE COMMAND LINE
  • C251: INCDIR DIRECTIVE

INCDIR 编译器伪指令

缩写

无。

参数

括号括起来的包含文件的路径说明。

缺省

无。

µVision

Options — C51 — Include Paths.

描述

INCDIR 伪指令指定编译器包含文件的路径。 编译器最多访问512 个路径声明。如果说明多个路径,路径名之间用分号隔开。

用双引号 ('"') 扩起来的包含文件按下面的顺序搜索:

  • 当前文件夹。
  • 源文件所在的文件夹。
  • INCDIR 伪指令指定的路径。
  • 有 C51INC 环境变量指定的路径。

用尖括号 ('<>') 扩起来的包含文件按下面的顺序搜索:

  • INCDIR 伪指令指定的路径。
  • 有 C51INC 环境变量指定的路径。

示例
C51 SAMPLE.C INCDIR(C:\MYINC;C:\CHIP_DIR)

 相关知识库标题

  • GENERAL: DIFFERENCES BETWEEN #INCLUDE <FILE> AND "FILE"
  • C51: UNABLE TO FIND INCLUDE FILES USING LONG DIRECTORY NAMES
  • C51: SPECIFYING HEADER PATHS FROM THE COMMAND LINE
  • C251: INCDIR DIRECTIVE





原创粉丝点击