在 MASM32 上包含语法

发布于 2024-08-21 05:13:37 字数 322 浏览 6 评论 0原文

当将文件包含到 MASM32 中时,它找不到自己的文件。包含 masm32rt.inc 后,汇编器找不到 \masm32\include\windows.inc

显然大多数 MASM 系统包含文件以 \ 开头,而不是指定相对或绝对路径。

我尝试在 %PATH% 中指定目录,设置 /I 编译开关,并设置 INCLUDE 和 MASM32 环境变量,但没有成功。

看来它给了Windows一条它不理解的路径。解决方案是在文件中进行批量查找和替换,并在指令之前添加 C:。但是我想阻止编辑他们提供的文件,并找到正确的方法来做到这一点。

我该如何设置它才能找到自己的文件?

When including files into MASM32, it cannot find it's own files. After including masm32rt.inc, the assembler cannot find \masm32\include\windows.inc

Apparently most MASM system include files begin with \ instead of specyfing a relative or absolute path.

I tried specifying the directory in %PATH%, setting the /I compile switch, and setting the INCLUDE and MASM32 environment variables without success.

It seems that it is giving windows a path it doesn't understand. A solution would be to do a mass find and replace in files, and add C: before the directives. However I would like to prevent editing the files they provide, and find out the proper way to do it.

How do I set it up so that it can find it's own files?

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

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

发布评论

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

评论(2

月光色 2024-08-28 05:13:37

据我所知,您可以通过两种方式处理这个问题,您需要检查您的 MASM32 文档,有一个 -I 命令开关来指定包含目录,或者使用环境变量(MASM32INCLUDE IIRC)..可以通过右键单击“我的电脑”,左键单击“属性”,出现一个带有不同选项卡页的对话框来设置环境变量,左键单击“高级”,然后左键单击“环境变量”,然后粘贴“包含”和“MASM32”的环境变量...

希望这有帮助,
此致,
汤姆.

You could deal with this in two ways that I know of, you need to check your MASM32 documentation, there's an -I command switch to specify the include directory, or use an environment variable (MASM32 or INCLUDE IIRC)..You can set the environment variable by right-clicking on 'My Computer', left-click on 'Properties', a dialog box with different tab pages appears, left-click on 'Advanced', then left-click on 'Environment Variables', and stick in the environment variables for 'INCLUDE' and 'MASM32'...

Hope this helps,
Best regards,
Tom.

初相遇 2024-08-28 05:13:37

它似乎被设计为需要在安装它的同一驱动器上进行开发。就我而言,我将其安装到 F:,但我的开发内容位于 C:...我最终将其从 F: 复制到 C:(并留在两个地方),以便无论如何都能找到它。

It seems to be designed to require development on the same drive that it's installed on. In my case I installed it to F:, but my dev stuff is on C:... I ended up copying it from F: to C: (and leaving in both places) so that it can find it no matter what.

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