Main Content

getPath

Path 中获取编译工具的路径和宏

语法

btpath = h.getPath
btmacro = h.getPath('macro')

说明

btpath = h.getPathcoder.make.BuildTool.Paths 返回编译工具的路径。

btmacro = h.getPath('macro')coder.make.BuildTool.Paths 返回编译工具路径的宏

提示

如果系统命令环境为编译工具指定路径变量,则路径的值不需要由 BuildTool 对象指定。

输入参数

全部展开

coder.make.BuildTool 对象的对象句柄,指定为变量。

示例: tool

输出参量

全部展开

BuildTool 对象的路径,以标量形式返回。

数据类型: char

BuildTool 对象的路径的宏,以标量形式返回。

数据类型: char

示例

输入以下行:

tc = coder.make.ToolchainInfo;
tool = tc.getBuildTool('C Compiler');
tool.getPath
ans  = 

     ''
tool.getPath('macro')
ans  = 

CC_PATH
tool.setPath('/gcc')
tool.Path
ans = 

	Macro  : CC_PATH
	Value : /gcc

版本历史记录

在 R2013a 中推出