:(
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
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
whether i have add [section .text] or not , it cannot solve the problem !but thank you any way
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
:bg
Thank you very much!