- From: Tuexen Michael <michael.tuexen AT siemens.com>
 
- To: "'Marjan Bozinovski'" <marjanb AT cpk.auc.dk>,	Thomas Dreibholz <dreibh AT exp-math.uni-essen.de>,	rsplib-discussion AT sctp.de
 
- Subject: RE: [RSPlib-Discusssion] external use of rsplib and socketapi
 
- Date: Fri Sep  6 12:52:00 2002
 
- List-id: RSPlib Discussions <rsplib-discussion.sctp.de>
 
 
Marjan,
you must also link against the libraries for
- reliable server pooling
- socketapi
- sctp
- glib
(in this order). Additionally (depending on your OS) you
must enable pthread handling. On FreeBSD you specify a compiler
flag, on Linux you link against a library.
Best regards
Michael
Michael Tuexen   Tel.:   +49 89 722 47210
Siemens AG       Fax:    +49 89 722 48212
ICN WN CC SE 7   e-mail: 
Michael.Tuexen AT siemens.com
>
 -----Original Message-----
>
 From: Marjan Bozinovski 
>
 [mailto:marjanb AT cpk.auc.dk]
>
 Sent: Friday, September 06, 2002 12:17 PM
>
 To: Thomas Dreibholz; 
>
 rsplib-discussion AT sctp.de
>
 Subject: Re: [RSPlib-Discusssion] external use of rsplib and socketapi
>
 
>
 
>
 Thank you Thomas.
>
 
>
 Sorry to bother you with this but I still can't figure it 
>
 out. You say that
>
 when installing rsplib and socketapi, that will install the 
>
 libraries under
>
 /usr/local/lib and the include file (ext_socket.h or rsplib.h) under
>
 /usr/local/include. That is clear.
>
 
>
 Then you said that to use the libraries I should link my 
>
 program to -lrsplib
>
 and -lsocketapi. Is it not -lsctpsocket instead of 
>
 -lsocketapi, since there
>
 is no file named socketapi in /usr/local/lib. Is it
>
 only -lrsplib -lsocketapi, or should I also add -lsctp -lglib12?
>
 
>
 I did all this but when starting to compile, it reports some 
>
 errors like:
>
 
>
 undefined reference to 'pthread_mutex_init', 'pthread_mutex_lock',
>
 'pthread_mutex_unlock' and many others based on pthread.
>
 
>
 The Make File of my program contains the following lines:
>
 ----------------------------------------
>
 NAME = sipclient
>
 LIBS =
>
 
>
 INCLUDE = /usr/local/include
>
 
>
 LDFLAGS = -L/usr/local/lib -Llib $(LIBS) -lrsplib -lsocketapi
>
 
>
 CFLAGS += -O0 -g -Wall -I$(INCLUDE)
>
 
>
 CXXFLAGS += $(CFLAGS)
>
 
>
 CC = g++
>
 
>
 CPP = g++
>
 
>
 OBJS = tstudpcli.o tstudpserv.o tstfile.o common.o tstsgn.o client.o
>
 tstcmprec.o
>
 
>
 all: $(NAME)
>
 
>
 $(NAME): $(OBJS)
>
 
>
 $(CPP) -o $(NAME) $(CXXFLAGS) $(OBJS) $(LDFLAGS)
>
 
>
 -@ echo
>
 
>
 -@ echo ! $(NAME) compiled !
>
 
>
 -@ echo
>
 
>
 tstudpserv.o: tstudpserv.cpp *.h
>
 
>
 $(CC) -c tstudpserv.cpp $(CXXFLAGS)
>
 
>
 tstsgn.o: tstsgn.cpp *.h
>
 
>
 $(CC) -c tstsgn.cpp $(CXXFLAGS)
>
 
>
 tstfile.o: tstfile.cpp *.h
>
 
>
 $(CC) -c tstfile.cpp $(CXXFLAGS)
>
 
>
 common.o: common.cpp *.h
>
 
>
 $(CC) -c common.cpp $(CXXFLAGS)
>
 
>
 client.o: client.cpp *.h
>
 
>
 $(CC) -c client.cpp $(CXXFLAGS)
>
 
>
 tstcmprec.o: tstcmprec.cpp *.h
>
 
>
 $(CC) -c tstcmprec.cpp $(CXXFLAGS)
>
 
>
 clean:
>
 
>
 -@ rm *.o > /dev/null 2>&1
>
 
>
 --------------------
>
 
>
 Best regards,
>
 
>
 Marjan
>
 
>
 
>
 ----- Original Message -----
>
 From: "Thomas Dreibholz" 
>
 <dreibh AT exp-math.uni-essen.de>
>
 To: "Marjan Bozinovski" 
>
 <marjanb AT cpk.auc.dk>;
>
  
>
 <rsplib-discussion AT sctp.de>
>
 Sent: Friday, September 06, 2002 10:51 AM
>
 Subject: Re: [RSPlib-Discusssion] external use of rsplib and socketapi
>
 
>
 
>
 > -----BEGIN PGP SIGNED MESSAGE-----
>
 > Hash: SHA1
>
 >
>
 > Am Donnerstag, 5. September 2002 17:30 schrieb Marjan Bozinovski:
>
 > > Hi,
>
 > >
>
 > > I am trying to write my own PU client application, which 
>
 will make use
>
 of
>
 > > the same header files listed in the file examplepu.c:
>
 > >
>
 > > #include "tdtypes.h"
>
 > > #include "utilities.h"
>
 > > #include "netutilities.h"
>
 > > #include "rsplib.h"
>
 > > #include "breakdetector.h"
>
 > >
>
 > > #include <ext_socket.h>
>
 > > #include <signal.h>
>
 > >
>
 > > Probably, one way of doing this is to create the new 
>
 client the same way
>
 > > examplepu.c has been created. But, I want to have the 
>
 client program
>
 > > existing in a different directory than rsplib and with independent
>
 > > compiling. My question is how to link my PU client 
>
 application with the
>
 > > rsplib and socketapi? I don't know if I understand it 
>
 well, but is the
>
 main
>
 > > problem actually how to link to the header files which 
>
 are existent in
>
 > > another directory and are necessary for this new application.
>
 >
>
 > To install the socket API or the rsplib, run "make install" 
>
 in the main
>
 > directory of the package. This will install the library under
>
 /usr/local/lib
>
 > and the include file (ext_socket.h or rsplib.h) under 
>
 /usr/local/include.
>
 To
>
 > use the libraries, link your program with -lrsplib -lsocketapi.
>
 >
>
 > To use the rsplib, you only need to include rsplib.h. The 
>
 other header
>
 files
>
 > are only used internally. (examplepe uses some functions 
>
 from utilities.h
>
 and
>
 > netutilities.h for string<->address conversion and printing.)
>
 >
>
 >
>
 > Best regards
>
 > - --
>
 > 
>
 ==============================================================
>
 =========
>
 >  Dipl.-Inform. Thomas Dreibholz
>
 >
>
 >  University of Essen,                            Room ES210
>
 >  Inst. for Experimental Mathematics              Ellernstraße 29
>
 >  Computer Networking Technology Group            D-45326 
>
 Essen/Germany
>
 > - 
>
 --------------------------------------------------------------
>
 ---------
>
 >  E-Mail:     
>
 > dreibh AT exp-math.uni-essen.de
>
 >  Homepage:   http://www.exp-math.uni-essen.de/~dreibh
>
 > 
>
 ==============================================================
>
 =========
>
 > -----BEGIN PGP SIGNATURE-----
>
 > Version: GnuPG v1.0.6 (GNU/Linux)
>
 > Comment: For info see http://www.gnupg.org
>
 >
>
 > iD8DBQE9eGyO32BbsHYPLWURAvBFAKDYTP90PdNZyX+ZhQmyCJnodKNNPgCggIlH
>
 > VS8riU2Sh3y3jYfbgP8gWA4=
>
 > =HNGN
>
 > -----END PGP SIGNATURE-----
>
 > _______________________________________________
>
 > rsplib-discussion mailing list
>
 > rsplib-discussion AT sctp.de
>
 > http://www.sctp.de/mailman/listinfo/rsplib-discussion
>
 >
>
 
>
 _______________________________________________
>
 rsplib-discussion mailing list
>
 rsplib-discussion AT sctp.de
>
 http://www.sctp.de/mailman/listinfo/rsplib-discussion
>
 
Archive powered by MHonArc 2.6.19+.