开发者

masm32 Linking 2 .obj files (SIMPLE)

开发者 https://www.devze.com 2023-04-05 21:18 出处:网络
I just started to learn masm32 and am a bit confused about the .obj files, I used C# before, so the compiler linked for me, now I have qeditor but I cant find an option to assemble multiple .asm files

I just started to learn masm32 and am a bit confused about the .obj files, I used C# before, so the compiler linked for me, now I have qeditor but I cant find an option to assemble multiple .asm files. I have a very basic program built of:

Vector.asm (+ Vector.inc), ...is a vector
Matrix.asm (+ Matrix.inc), ...is a matrix
Main.asm ... is the main program where I do some Vector calculations

When I compile each one of them seperate, I get 3 .obj files, what are they? I looked into the makeit.bat at the line:

\m开发者_运维技巧asm32\bin\PoLink /SUBSYSTEM:CONSOLE "console.obj"

so I thought I could just change it to

\masm32\bin\PoLink /SUBSYSTEM:CONSOLE "console.obj" "vector.obj" "matrix.obj"

to compile my whole program, but I was wrong :(, can anyone help me to successfully create a .bat (because maybe I want to create a little ide later, for which I would need a .bat) which compiles the 3 .obj files into 1 .exe?


I'm not familiar with PoLink, but a standard linker requires more than just a list of .obj files. It will also need to know what you intend on calling the resulting .exe (it can assume if you only give it a single .obj file). May also require an entry point. May even require library definitions if you're doing multiple files. You really need to read the docs and see what it wants on the command line...

0

精彩评论

暂无评论...
验证码 换一张
取 消

关注公众号