Why does entry point of _start results in error when linking with GCC on Windows/MinGW?
Using the following .asm file I assemble and link using the following commands on Windows 10 using MinGW:
nasm -f win32 helloworld.asm gcc -e_start -o helloworld helloworld.obj
Assembling works just fine, however linking produces the following error:
c:/dev/mingw/bin/../lib/gcc/mingw32/4.9.3/../../../libmingw32.a(main.o):(.text.startup+0xa0): undefined reference to `[email protected]'
_main everything seems to work fine. Why is that?
BITS 32 global _start extern _printf section .text _start: push msg call _printf add esp, 4 ret msg: db "HelloWorld", 10, 0