在 MASM32 上包含语法
当将文件包含到 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 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(2)
据我所知,您可以通过两种方式处理这个问题,您需要检查您的 MASM32 文档,有一个
-I
命令开关来指定包含目录,或者使用环境变量(MASM32
或INCLUDE
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
orINCLUDE
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.
它似乎被设计为需要在安装它的同一驱动器上进行开发。就我而言,我将其安装到 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.