[Spread-users] Undefined reference to functions error

Zahir Koradia zahir.koradia at gmail.com
Mon Aug 21 11:31:06 EDT 2006


Hi Mathew,
I did try providing the library but made a stupid mistake. Since the
library file name was
libspread I provided -libspread to gcc. -lspread worked.

Thanks,
Zahir


On 8/21/06, Matthew Gillen <mgillen at bbn.com> wrote:
> Zahir Koradia wrote:
> > Hi,
> > I am new to Spread and was trying to write a dummy program just to get
> > a feel of it.
> > I go the following error:
> > /cygdrive/c/DOCUME~1/Zahir/LOCALS~1/Temp/ccoIkCah.o:spread_sender.cc:(.text+0x67):
> >
> > undefined reference to `_SP_connect'
> > /cygdrive/c/DOCUME~1/Zahir/LOCALS~1/Temp/ccoIkCah.o:spread_sender.cc:(.text+0xa8):
> >
> > undefined reference to `_SP_join'
> > /cygdrive/c/DOCUME~1/Zahir/LOCALS~1/Temp/ccoIkCah.o:spread_sender.cc:(.text+0xf9):
> >
> > undefined reference to `_SP_leave'
> > /cygdrive/c/DOCUME~1/Zahir/LOCALS~1/Temp/ccoIkCah.o:spread_sender.cc:(.text+0x106):
> >
> > undefined reference to `_SP_disconnect'
> > collect2: ld returned 1 exit status
>
> You included a lot of information, which is good, but missed the one part
> that's relevant to your problem: the actual command line used to compile.
>
> My guess is that you need to add '-lspread' to your gcc/g++ command line.
>
> Matt
>




More information about the Spread-users mailing list