VC6 使用环境变量设置附加包含路径?

发布于 2024-07-07 10:05:09 字数 585 浏览 16 评论 0原文

我不敢相信我会问这个...

自从我使用 VC6 以来已经有一段时间了。 我设置了我认为正确的方法来包含包含文件的附加目录(我删除了另一个开发人员的硬编码路径)并放入类似以下内容的内容:

%MY_DIR%\include

但这不起作用。 我错过了什么吗? VC6不允许吗? 这似乎是一个非常基本的东西,现在我想起来了,我不记得以前做过这件事...

(我在设置变量后确实停止并重新启动了 VC6)

Google 搜索和快速搜索在这里搜索没有发现任何东西。

编辑

显然我不能投票给我自己的答案 - 但它如下:

语法是:

$(ENV_VAR)

而不是

%ENV_VAR%


我宁愿不必添加到包含环境变量 - 这似乎意味着我有现在从命令行构建。 我希望能够在项目设置中添加环境变量。 这看起来是一件非常简单的事情,但也许这对 IDE 团队的期望太高了。

我不确定 %MY_DIR% 未正确考虑意味着什么...我确实像您建议的那样从工具菜单启动了 cmd.exe,并且我设置的 env 路径在那里并且符合预期。

I can't believe I am asking this...

It has been a while since I used VC6. I set up what I thought was the correct way to include additional directories for include files (I removed another developer's hard coded paths) and put in something like:

%MY_DIR%\include

but this does not work. Am I missing something? Did VC6 not allow this? It seems like a pretty basic thing to have and now that I think about it it I can't recall ever having done it before...

(I did stop and re-start VC6 after I set the variables)

Google search and a quick search here did not reveal anything.

EDIT

Apparently I can't vote for my own answer - but it is below:

The syntax is:

$(ENV_VAR)

not

%ENV_VAR%


I'd rather not have to add to an include env variable - that seems to imply that I have to build from a command line now. I want to be able to add an environment variable in the project settings. That seems like a very simple thing to do, but perhaps that was expecting too much from the IDE team.

I am not sure what it means that %MY_DIR% is not taken into account properly... I did start cmd.exe from the tools menu like you suggested and the env path I set is there and as expected.

如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。

扫码二维码加入Web技术交流群

发布评论

需要 登录 才能够评论, 你可以免费 注册 一个本站的账号。

评论(2

意中人 2024-07-14 10:05:10

这就是答案......

它工作得很好。

$(ENV_VAR_NAME)
不是
%ENV_VAR_NAME%

(我觉得自己像个白痴。)

Here's the answer...

it works fine.

$(ENV_VAR_NAME)
not
%ENV_VAR_NAME%

(I feel like an idiot. )

蓝眼泪 2024-07-14 10:05:10

我认为 IDE 不会采用任何环境设置,除非您使用该标志。

哦,如果您从命令行启动它,那么您就没有从命令行构建。 您仍然可以使用 IDE 中的构建菜单。

I don't think that the IDE will take any environment settings unless you use that flag.

Oh, and you don't have build from the command line if you launch it from the command line. You can still use the build menu in the IDE.

~没有更多了~
我们使用 Cookies 和其他技术来定制您的体验包括您的登录状态等。通过阅读我们的 隐私政策 了解更多相关信息。 单击 接受 或继续使用网站,即表示您同意使用 Cookies 和您的相关数据。
原文