英文:
Use relative path to include libraries for MASM in Visual Studio
问题
我尝试将我的路径C:\masm32
添加到项目 -> 属性 -> Microsoft宏汇编器 -> 通用 -> 包含路径
中。然后汇编器使用以下命令编译我的项目:
ml.exe /c /nologo /Zi /Fo"Debug\test.obj" /l "C:\masm32" /W3 /errorReport:prompt /Tatest.asm"
这个命令包括了我的库路径,但在我的代码中,它不断告诉我只有\include\kernel32.inc
部分出现错误。
我的包含部分:
...
includelib \lib\kernel32.lib ;即使删除了.inc文件,这两个.lib文件似乎没有错误
includelib \lib\masm32.lib ;仅对.inc文件报告错误
include \include\kernel32.inc ;无法打开文件:\include\kernel32.inc
include \include\masm32rt.inc ;...
这是否与include \include\...
中使用的相同关键字有关?
英文:
I tried to add my path C:\masm32
to Include Paths
in Project -> Properties -> Microsoft Macro Assembler -> General -> Include Paths
. The assembler then compiles my project with the command:
ml.exe /c /nologo /Zi /Fo"Debug\test.obj" /l "C:\masm32" /W3 /errorReport:prompt /Tatest.asm"
Which did include my path to libraries but in my code it keeps telling me to have error at only the part for the \include\kernel32.inc
My includes:
...
includelib \lib\kernel32.lib ;These two .lib files seem to have
includelib \lib\masm32.lib ;no error even if i remove the .inc files
include \include\kernel32.inc ;It only reports error for .inc files
include \include\masm32rt.inc ;cannot open file: \include\kernel32.inc
...
Does this have anything to do with the same keyword used for include \include\...
?
答案1
得分: 0
我通过删除前面的\
来解决了这个问题,所以它变成了include include\kernel32.inc
。
英文:
I fixed the problem by removing the leading \
so it became include include\kernel32.inc
.
通过集体智慧和协作来改善编程学习和解决问题的方式。致力于成为全球开发者共同参与的知识库,让每个人都能够通过互相帮助和分享经验来进步。
评论