SCTP Discussions

Text archives Help


RE: [SCTP-Discussion] undefined reference to sctp_whatever...


Chronological Thread 
  • From: Tuexen Michael <Michael.Tuexen AT icn.siemens.de>
  • To: "'discussion AT sctp.de'" <discussion AT sctp.de>
  • Subject: RE: [SCTP-Discussion] undefined reference to sctp_whatever...
  • Date: Fri Mar 16 12:20:02 2001
  • List-id: SCTP Discussions <discussion.sctp.de>

Dear Lode, Dear all,

assuming that you have in the working directory the files
app.c
sctp.h
libsctp.a

You can compile (at least under Max OS X and Linux) the app
using

cc -o app app.c libsctp.a /usr/local/lib/libglib.a

the sequence is important. Use gcc if you do not have cc.

So, we need two libraries:
1. glib
2. sctp

Happy SCTPing
Michael

Michael Tuexen Tel.: +49 89 722 47210
Siemens AG Fax: +49 89 722 48212
ICN WN CS SE 51 E-mail:
Michael.Tuexen AT icn.siemens.de

> -----Original Message-----
> From: Andreas Jungmaier
> [SMTP:ajung AT exp-math.uni-essen.de]
> Sent: Thursday, March 15, 2001 2:52 PM
> To:
> discussion AT sctp.de;
> Coene Lode
> Subject: Re: [SCTP-Discussion] undefined reference to sctp_whatever...
>
> On Thursday, 15. March 2001 10:59, Coene Lode wrote:
> > Folks,
> >
> > I've installed the library version of SCTP(hoepfully correct?)
> > I've managed to include the SCTP.H file with my source code and compile
> > without errors.
> > But now the linker complains:
> > cd /home/p82609/siemens/sua/
> > make -k
> > g++ -o sua sua_main.o sua_database.o sua_file.o sua_distribution.o
> > sua_tcb.o sua_logging.o sua_test_user.o sua_syntax.o sua_cl.o sua_co.o
> > /home/p82609/sctplib-1.0.0-pre6/sctplib/sctp/libsctp.a
> > sua_database.o: In function
> > `Sua_List::register_instance(SCTP_ulp_Callbacks)':
> > sua_database.o(.text+0xa80): undefined reference to
> > `sctp_registerInstance(unsigned short, unsigned short, unsigned short,
> > unsigned int, unsigned char (*)[45], SCTP_ulp_Callbacks)'
> > collect2: ld returned 1 exit status
> > make: *** [sua] Error 1
>
> Hello Lode,
>
> you probably need to add the library libsctp.a file to the object
> files.
> Take something like
> # gcc -I. -I../sctp -O3 -Wall -c echo_server.c
> to create the object file, and
> # gcc -O3 -Wall -o echo_server echo_server.o ../sctp/libsctp.a
> to bind the object file and the (static) library together.
>
> Regards,
> --
>
> Andreas Jungmaier
>
> ----------------------------------------------------------------------------
> void hamlet()
> {#define question=((bb)||(!bb))}
> ----------------------------------------------------------------------------
> Andreas Jungmaier, Dipl.-Ing.
> University of Essen email:
> ajung AT exp-math.uni-essen.de
> Computer Networking Technology Group Tel. : +49 (0201) 183-7636
> ----------------------------------------------------------------------------
> PGP Public Key and Fingerprint: see http://www.exp-math.uni-essen.de/~ajung
> ----------------------------------------------------------------------------
> _______________________________________________
> discussion mailing list
> discussion AT sctp.de
> http://www.sctp.de/mailman/listinfo/discussion




Archive powered by MHonArc 2.6.19+.

Top of page