News:

MASM32 SDK Description, downloads and other helpful links
MASM32.com New Forum Link
masmforum WebSite

an strange link problem with golink

Started by baronpan, September 24, 2009, 02:38:36 PM

Previous topic - Next topic

baronpan

 :(
I met a very strange link error when writing a very simple asm. I used nasmx and the link tool is golink0.26.9e.

my program test.asm is just like :

start:

       ret

and i used   nasm -fwin32 -o test.obj test.asm to generate a obj file ,and it's done.
and i used   golink /entry start test.obj, it shows the error message :

Error!
The following symbol was not defined in the object file or files:-
start
Output file not made

why is that?
and i then include the windows.inc head file  in nasmx
it's well done then!

why is that ?what's the reason.

anyone can help me ?thanks

dedndave

i don't use nasm, but
it sounds like it's not opening a code segment
with no code segment, "start:" doesn't get created
try this...

.code
start:
ret
end start

baronpan

whether i have add [section .text] or not , it cannot solve the problem !but thank you any way

akane

Nasm does not export symbols like C/C++ does by default, you need to use the global directive:
segment .text
global main

main: ret  ; /entry main

baronpan