This thread has been locked.

If you have a related question, please click the "Ask a related question" button in the top right corner. The newly created question will be automatically linked to this question.

[参考译文] 编译器/TMS320F28377D:将文件中的变量用于-cmd_file 选项

Guru**** 3040200 points
请注意,本文内容源自机器翻译,可能存在语法或其它翻译错误,仅供参考。如需获取准确内容,请参阅链接中的英语原文或自行翻译。

https://e2e.ti.com/support/tools/code-composer-studio-group/ccs/f/code-composer-studio-forum/888173/compiler-tms320f28377d-use-variables-in-file-for---cmd_file-option

器件型号:TMS320F28377D

工具/软件:TI C/C++编译器

大家好

IM 正在使用编译器选项--cmd_file 在文件中指定编译器选项。  

在此文件中、我想指定几个--include_path 选项。

这些 include 路径应与工程路径相对。 因此、我想使用路径变量。  

编译器标志:
--cmd_file="C:\Software\Project\Lib\trunk \Includes.txt"

include.txt:
--include_path="${project_root}/Lib/trunk/Dir1
--include_path="${project_root}/Lib/trunk/Dir2
--include_path="${project_root}/Lib/trunk/Dir3
--include_path="${project_root}/Lib/trunk/Types
--include_path="${project_root}/Lib/trunk/Filter
--include_path="${project_root}/Lib/trunk/Version

如果文件包含完整路径、则不使用变量 PROJECT_ROOT 编译 器即可正常运行。

对于我们来说、编译器会产生错误  
"..\Lib\Trunk\Version\Version.h"、第29行:致命错误#1965:无法打开源文件"types.h"

有人知道问题是什么? 有没有更好的想法可以做到这一点?

感谢你能抽出时间。
此致

  • 请注意,本文内容源自机器翻译,可能存在语法或其它翻译错误,仅供参考。如需获取准确内容,请参阅链接中的英语原文或自行翻译。

    [引用 user="Samuel Keller]\n 我使用编译器选项--cmd_file 在文件中指定编译器选项。  [/报价]

    遗憾的是、编译器不支持此命令文件中的任何类型的变量、包括系统环境变量。

    谢谢、此致、

    乔治