Eclipse CDT中包含文件的相对路径
结构如下:Eclipse CDT中包含文件的相对路径,eclipse,eclipse-cdt,Eclipse,Eclipse Cdt,结构如下: subsystem sub_dir sub_dir ... new_sub_dir_for _unit_test_which_includes_eclipse_workspace Debug <=== this, I think, being ${workspace_loc} or is the parent directory ${workspace_loc}?
subsystem
sub_dir
sub_dir
...
new_sub_dir_for _unit_test_which_includes_eclipse_workspace
Debug <=== this, I think, being ${workspace_loc}
or is the parent directory ${workspace_loc}?
(since it contains .project and .cproject)
test_cases
stubs
file_1.c
file_1.h
file_1.c
file_1.h
...
software_under_test.c
software_under_test.h
子系统
副处长
副处长
...
用于单元测试的新目录,其中包括eclipse工作区
调试在浏览位置时是否使用变量选项
在CDT项目(项目属性/C/C++常规/路径和符号)中添加包含文件路径时,有3个选项可用于浏览位置:
- 变数
- 工作空间
- 文件系统
选择“工作区”选项,路径将相对于工作区/项目。选择Variables选项,您将可以使用变量,例如${WorkspaceDirPath}
。你甚至应该能够引用环境变量。我差不多两年前就接受了这个答案,所以它当时确实有效。从那时起,我已经忘记了如何使用真实路径的解决方案:-(无论是${WorkspaceDirPath}../foo
,还是`${WorkspaceDirPath:../foo}似乎都不起作用。知道我做错了什么吗?啊哈!明白了!${WorkspaceDirPath}//foo