Re: Problem Linking (win32)
- From: Frank Kotler <spamtrap@xxxxxxxxxx>
- Date: Wed, 23 Jul 2008 07:49:15 GMT
bwaichu@xxxxxxxxx wrote:
Per another discussion here, I decided to switch to using the win32
object format via nasm -f win32, and I went with the golink linker. I
was not able to find an app call alib to work with alink.
http://alink.sourceforge.net/download.html
But GoLink may be a better choice (never used it).
....
;assemble
;nasm -f win32 win32_func.asm
;golink /entry _start win32_func.obj kernel32.dll user32.dll
msvcrt.dll
extern MessageBoxA
extern ExitProcess
extern sprintf
section .code code CLASS=CODE
"-f win32" knows "section .text", "section .data", "section .bss", and "section .rdata", and knows the proper attributes. Probably have less trouble if you use 'em.
....
call [sprintf]
Pretty sure you don't want the "[]" here.
No idea if either of those will fix the "invalid handle" problem. "Courage", Brian! :)
Best,
Frank
.
- Follow-Ups:
- Re: Problem Linking (win32)
- From: Jim Carlock
- Re: Problem Linking (win32)
- From: Jim Carlock
- Re: Problem Linking (win32)
- References:
- Problem Linking (win32)
- From: bwaichu@xxxxxxxxx
- Problem Linking (win32)
- Prev by Date: Re: Troubles with LIB files on Dos-mode
- Next by Date: Re: Troubles with LIB files on Dos-mode
- Previous by thread: Re: Problem Linking (win32)
- Next by thread: Re: Problem Linking (win32)
- Index(es):