Unfortunately, I have been forced to switch to windows for now to program assembly code, instead of using Linux. But when trying to link my .obj file produced by NASM, it gives the error `gcc: Createprocess: No such file or directory."
My code:
GLOBAL _main
EXTERN _printf
_main:
push message
call _printf
add esp, 4
ret
message:
db 'Hello, world',10,0
I have tried moving my .obj file to the same directory as GCC. I have also tried compiling the entire thing in the same directory as GCC. I am not using any environment variables when compiling with my batch file, instead changing directory by hand. I also have GCC installed in the same directory as G++ and all the other compilers that come with MinGW.
Why does it give this error?
Thanks in advance
main(), specificallycall ___main. I recommend not to implementmain()in assembly as that call or whatever, when missing, may break things. - Alexey Frunze