- From: Andreas Jungmaier <ajung AT exp-math.uni-essen.de>
- To: Rahul <rahultamrakar AT ittoolbox.net>
- Cc: discussion AT sctp.de
- Subject: Re: [SCTP-Discussion] undefined reference to `SCTP_receive"
- Date: Thu Apr 15 16:42:03 2004
- List-id: SCTP Discussions <discussion.sctp.de>
- Organization: University Duisburg-Essen
-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1
On Donnerstag 15 April 2004 16:06, Rahul wrote:
>
Hi
>
I am new to SCTP , planning to use for project but stuck on starting
>
i have install
>
sctp-1.0.1
>
spcktapi 1.3.1
>
rsplib-0.3.0
>
on the redhat 9 system
>
>
i can run all the sample programes given in
>
"/sctp-1.0.1/sctplib.program" directory .
>
But I am getting below error if i want to compile terminal.c mysqlf
>
>
using this command to compile
>
gcc -o exp_terminal terminal.c -lsctp -lsctpsocket -lglib
>
>
/tmp/ccfY6q6a.o(.text+0x45f): In function `dataArriveNotif':
>
: undefined reference to `SCTP_receive'
Rahul,
you need to also link the object file where the function
SCTP_receive (and many other functions) are defined.
That file is sctp_wrapper.o
You probably also need to include the file sctp_wrapper.h
in your source file (which should be in terminal.c already).
The statements:
gcc -DHAVE_CONFIG_H -I. -I. -I../.. -I./../sctp -g -O2
- -I/usr/include/glib-1.2 -I/usr/lib/glib/include -D_REENTRANT -D_THREAD_SAFE
- -Wall -DLINUX -c sctp_wrapper.c
gcc -DHAVE_CONFIG_H -I. -I. -I../.. -I./../sctp -g -O2
- -I/usr/include/glib-1.2 -I/usr/lib/glib/include -D_REENTRANT -D_THREAD_SAFE
- -Wall -DLINUX -c terminal.c
should compile sctp_wrapper.c and terminal.c and create sctp_wrapper.o
and terminal.o.
The command:
gcc -g -O2 -I/usr/include/glib-1.2 -I/usr/lib/glib/include -D_REENTRANT
- -D_THREAD_SAFE -Wall -DLINUX -o exp_terminal terminal.o
sctp_wrapper.o ../sctp/libsctp.la -rdynamic -lgmodule -lglib -ldl
should then link the object files and create the new terminal program
you want.
Hope that helps,
Andreas
- --
Dipl.-Ing. Andreas Jungmaier
Computer Networking Technology Group
University of Duisburg-Essen
http://www.exp-math.uni-essen.de/~ajung
PGP Key-ID: D382 4AC0
PGP Key-Fingerprint: 228C 7C2C 3381 2DD4 9998 2812 5C0B 0B04 D382 4AC0
-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.2.3 (GNU/Linux)
iD4DBQFAfp4hXAsLBNOCSsARAlrIAJihQ9EeYFu2/6Lk0v0C2E4BrZCiAJ0RmM9x
+siqRoAoI+Rj3BDBTEsA4Q==
=gmyf
-----END PGP SIGNATURE-----
Archive powered by MHonArc 2.6.19+.