gbadev.org forum archive

This is a read-only mirror of the content originally found on forum.gbadev.org (now offline), salvaged from Wayback machine copies. A new forum can be found here.

ASM > Linking undefined reference problem.

#8888 - slip - Wed Jul 23, 2003 5:19 am

Ok this probably sounds familiar but its a little different... I have written a function in asm that takes 8 parameters 'drawLine' (like in my other topic). In my C++ header file I have the appropriate 'extern void drawLine(......);' When linking without calling from anywhere there is no problems. But when linking when I've made a call somewhere, I get undefined reference to drawLine(......). I have made sure the object file 'tline.o' which I have made from 'tilne.s' using:

g++ -c -o tline.o tline.s

I have also tried:

g++ -c -x assembler -o tline.o tline.s

is being linked. It would seem that the Function drawLine: in my tline.s isn't be reconised as the drawLine function. I'm not sure I'm linking or compiling properly.

I have tried compiling and linking in the same way one of the asm routines from the asm graphics library at devrs.com but have the same problem. Has anyone got any ideas?
_________________
[url="http://www.ice-d.com"]www.ice-d.com[/url]

#8889 - slip - Wed Jul 23, 2003 5:53 am

Never mind. I did a search on google. and found this email:

http://sources.redhat.com/ml/crossgcc/1998-q2/msg00123.html

It helped solve my problem =)
_________________
[url="http://www.ice-d.com"]www.ice-d.com[/url]