Hi everyone -
Just for fun I thought I'd give Alink a try. Here's the source code:
%include "c:\MinGW\myincludes\asm_io.inc"
%include "c:\nasmx\inc\win32\windows.inc"
section .data
greet db "This is hello from a program linked by ALink", 0
format db "%s", 0
section .text
global _main
extern _printf
_main:
enter 0,0
push greet
push format
call _printf
add esp, 8
mov eax, 0
leave
ret
I'm assembling with the -f win32 switch set. The code creates a nice object file. However, using this command:
alink -oPE ALinkHello
results in a message saying that _printf is not resolved. Just for fun, I threw in a -L switch to use the win32.lib that accompanies the alink distribution. The more complex command line is
alink -oPE ALinkHello -L c:\MinGW\Lib\WIN32.LIB
doesn't help. Still get a message regarding unresolved external reference to _printf.
Now, as a matter of fact if I use GCC to do the linking instead, links and runs just ducky.
Ever eager to learn, I am hoping someone can give me a clue.
Regards,
Mark Allyn