multiple definition
Posted: Mon Jun 28, 2004 8:30 am
This might be more of a C question but since I only have had this problem when working with OSes I though I could ask it here..
I have a main-file with the main-method...and then I got some IO functions to write/read ports.. works fine..
then I tried to put the in/out functions in a file called IO.c and I included this file in the main-file.. (like you allways do).. but when I try to link I get this message:
kernel.o(.text+0x0):kernel.c: multiple definition of `_out'
io.o(.text+0x0):io.c: first defined here
kernel.o(.text+0x1d):kernel.c: multiple definition of `_in'
io.o(.text+0x1d):io.c: first defined here
I dont know why... I tried to put the "#ifndef.." stuff in the IO file..but it does not work.. when my kernel grows bigger I can have it all in just one file
I have a main-file with the main-method...and then I got some IO functions to write/read ports.. works fine..
then I tried to put the in/out functions in a file called IO.c and I included this file in the main-file.. (like you allways do).. but when I try to link I get this message:
kernel.o(.text+0x0):kernel.c: multiple definition of `_out'
io.o(.text+0x0):io.c: first defined here
kernel.o(.text+0x1d):kernel.c: multiple definition of `_in'
io.o(.text+0x1d):io.c: first defined here
I dont know why... I tried to put the "#ifndef.." stuff in the IO file..but it does not work.. when my kernel grows bigger I can have it all in just one file