help,c++ kernel link error

Question about which tools to use, bugs, the best way to implement a function, etc should go here. Don't forget to see if your question is answered in the wiki first! When in doubt post here.
Post Reply
User avatar
aninggo
Posts: 4
Joined: Wed Jul 25, 2007 8:07 pm
Contact:

help,c++ kernel link error

Post by aninggo »

i I download Quark-0.1 http://sarovar.org/projects/quark
i try make the kernel(in FC6,G++ 4.0.1)
but show link error

ld --oformat=binary -N -emain -Ttext 0x7400 -o kernel.bin main.o GDT.o IDT.o Exceptions.o PIC.o PIT.o PortIO.o Bios.o VGA.o Console.o Debug.o Keyboard.o Speaker.o Shutdown.o Delay.o DeviceQueue.o Shell.o Time.o exception.o DMA.o ../lib/libc.o
PIT.o: In function `initTimeArea()':
PIT.cpp:(.text+0x34): undefined reference to `memcpy'
Attachments
Quark-0.1.tar.gz
(60.29 KiB) Downloaded 15 times
User avatar
JamesM
Member
Member
Posts: 2935
Joined: Tue Jul 10, 2007 5:27 am
Location: York, United Kingdom
Contact:

Post by JamesM »

Did all the files compile correctly? If one didn't (containing memcpy) the symbols in it won't be generated, and you'll get that error.
Alternatively check all files are included in the linker command.
pcmattman
Member
Member
Posts: 2566
Joined: Sun Jan 14, 2007 9:15 pm
Libera.chat IRC: miselin
Location: Sydney, Australia (I come from a land down under!)
Contact:

Post by pcmattman »

'memcpy' must be defined as extern "C".
User avatar
aninggo
Posts: 4
Joined: Wed Jul 25, 2007 8:07 pm
Contact:

Post by aninggo »

ok, make success, thanks JamesM and pcmattman. :)
Post Reply