Reputation: 174
Please, help me with linking and compilation of 2 simple files. I tried changing extension of MyProcedure.asm to inc, decorating and undecorating of the name MyProcedure (masm started requesting double decorating then), making MyProcedure public, tried /coff but I cannot find the solution. I just want to compile 2 files (masm32) in Visual Studio 2022. I did link libraries correctly. I cannot change the system's PATH so I can only use Visual Studio 2022 menus, not the console. When I try to compile these files I receive an error that _MyProcedure does not exist. I am unable to compile and run the program. I would appreciate help how to successfully compile this program. Due to limitations I have to use Ms Visual Studio menus and command buttons, I cannot type commands on the console (I cannot edit PATH of my operating system).
INCLUDE Irvine32.inc
EXTERN MyProcedure:PROC ; Deklaracja zewnętrznej procedury
.data
message BYTE "Hello from Main.asm!", 0
.code
main PROC
mov edx, OFFSET message
call WriteString
call CrLf
call MyProcedure
call ExitProcess
main ENDP
END main
and MyProcedure.asm
INCLUDE Irvine32.inc
PUBLIC MyProcedure
.data
message BYTE "Hello from MyProcedure.asm!", 0
.code
MyProcedure PROC
mov edx, OFFSET message
call WriteString
call CrLf
ret
MyProcedure ENDP
END
Upvotes: 1
Views: 80
Reputation: 174
Michael Petch solved my problem. It required changing EXTERN MyProcedure: PROC Into MyProcedure PROTO.
Upvotes: 1