OSEC

Neohapsis is currently accepting applications for employment. For more information, please visit our website www.neohapsis.com or email hr@neohapsis.com
 
Re: [OT] Compiling problem

From: Andreas Kähäri (akfreeshell.org)
Date: Sun Jul 13 2003 - 16:47:01 CDT


On Sun, Jul 13, 2003 at 06:35:37PM -0300, Nicolás Conde wrote:
> Hello all.
> I have a problem with C code, I'm using OBSD 3.3 i386, thought you
> may help me.
> I have a code that gives this error when making:
>
> > make
> g++ -I. -Wall -Wno-unused -O2 -c afs.c
> g++ -I. -Wall -Wno-unused -O2 -c fs.c
> g++ -I. -Wall -Wno-unused -O2 -o cmd cmd.c blk.o vol.o afs.o fs.o
> fs.o(.bss+0x0): multiple definition of `fdTable'
> afs.o(.bss+0x220): first defined here
> collect2: ld returned 1 exit status
> make: *** [cmd] Error 1
[cut]
> ¿Could you take a look at the code and point me my (silly?) mistake?
> Thanks in advance.

Nothing of what you included is causing the error. However,
there are a definition of "fdTable" (a function or a global
variable) in both fs.c and afs.c (or in a header that they both
include). There must be only one, otherwise you wouldn't know
which one to use.

--
Andreas Kähäri
Essex, England