Hi,

I have some asm code that I'm trying to call printf from. It works under links
with the following linker command:

-lc -dynamic-linker /lib/ld-linux.so.2

But how do I link it in mingw? I keep getting undefined reference to printf.

asm Code:

.section .text
.globl _start
_start:
#note that the parameters are passed in the
#reverse order that they are listed in the
#function's prototype.
pushl numberloved #This is the %d
pushl $personstring #This is the second %s
pushl $name #This is the first %s
pushl $firststring #This is the format string in the prototype
call printf
movl $0, %ebx
movl $1, %eax
int $0x80

Reply via email to