- From: "Djuneid Dillun" <dd29 AT kent.ac.uk>
- To: <discussion AT sctp.de>
- Subject: [SCTP-Discussion] compile error
- Date: Fri Jul 23 12:52:01 2004
- List-id: SCTP Discussions <discussion.sctp.de>
Hi,
I am using SCTP as part of a project. I have compiled the library and
everything works fine. I would like to know how I can use the gcc commands
to compile sctp programs. For example, I copied the files sctpmultiserver.cc
and sctpterminal.cc in another folder and wanted to compile them using the
gcc commands but I'm afraid that I'm not using the appropriate commands. I
also had to update the included headers in the program. When compiling I
did:
gcc -lsctp -lglib sctpmultiserver.cc -o server but I'm having the following
errors:
***************************************
In file included from sctpmultiserver.cc:50:
../../socketapi/tdsystem.h:97: conflicting types for `typedef int socklen_t'
/usr/include/unistd.h:247: previous declaration as `typedef __socklen_t
socklen_t'
In file included from sctpmultiserver.cc:50:
../../socketapi/tdsystem.h:130:3: warning: #warning Variable SYSTEM with
operating system name not defined! Use e.g. -DOS_Linux compiler option.
../../socketapi/tdsystem.h:131:3: warning: #warning Trying Linux...
In file included from sctpmultiserver.cc:52:
../../cppsocketapi/tdsocket.h:47:22: tdsystem.h: No such file or directory
../../cppsocketapi/tdsocket.h:48:29: internetaddress.h: No such file or
directory
../../cppsocketapi/tdsocket.h:49:26: internetflow.h: No such file or
directory
In file included from sctpmultiserver.cc:52:
../../cppsocketapi/tdsocket.h:245: parse error before `&' token
../../cppsocketapi/tdsocket.h:256: parse error before `*' token
../../cppsocketapi/tdsocket.h:275: `SocketAddress' was not declared in this
scope
../../cppsocketapi/tdsocket.h:275: `address' was not declared in this scope
../../cppsocketapi/tdsocket.h:275: `Socket*accept' redeclared as different
kind
of symbol
/usr/include/sys/socket.h:191: previous declaration of `int accept(int,
sockaddr*, int*)'
../../cppsocketapi/tdsocket.h:285: parse error before `&' token
../../cppsocketapi/tdsocket.h:297: parse error before `*' token
../../cppsocketapi/tdsocket.h:483: parse error before `&' token
../../cppsocketapi/tdsocket.h:531: type specifier omitted for parameter `
SocketAddress'
../../cppsocketapi/tdsocket.h:531: parse error before `&' token
../../cppsocketapi/tdsocket.h:597: `SocketAddress' was not declared in this
scope
../../cppsocketapi/tdsocket.h:597: `address' was not declared in this scope
../../cppsocketapi/tdsocket.h:597: invalid data member initialization
../../cppsocketapi/tdsocket.h:597: (use `=' to initialize static data
members)
../../cppsocketapi/tdsocket.h:610: `SocketAddress' was not declared in this
scope
../../cppsocketapi/tdsocket.h:610: `address' was not declared in this scope
../../cppsocketapi/tdsocket.h:610: invalid data member initialization
../../cppsocketapi/tdsocket.h:621: parse error before `&' token
../../cppsocketapi/tdsocket.h:631: parse error before `&' token
../../cppsocketapi/tdsocket.h:676: parse error before `&' token
../../cppsocketapi/tdsocket.h:685: `InternetFlow' was not declared in this
scope
../../cppsocketapi/tdsocket.h:685: `flow' was not declared in this scope
../../cppsocketapi/tdsocket.h:685: invalid data member initialization
../../cppsocketapi/tdsocket.h:685: variable or field `freeFlow' declared
void
../../cppsocketapi/tdsocket.h:698: `InternetFlow' was not declared in this
scope
../../cppsocketapi/tdsocket.h:698: `flow' was not declared in this scope
../../cppsocketapi/tdsocket.h:699: parse error before `expires'
../../cppsocketapi/tdsocket.h:727: parse error before `&' token
../../cppsocketapi/tdsocket.h:745: parse error before `*' token
../../cppsocketapi/tdsocket.h:773: `SocketAddress' was not declared in this
scope
../../cppsocketapi/tdsocket.h:773: `addressList' was not declared in this
scope
../../cppsocketapi/tdsocket.h:774: parse error before `&' token
../../cppsocketapi/tdsocket.h:805: parse error before `&' token
In file included from ../../cppsocketapi/tdsocket.h:827,
from sctpmultiserver.cc:52:
../../cppsocketapi/tdsocket.icc: In member function `card32
Socket::getSendFlowLabel() const':
../../cppsocketapi/tdsocket.icc:91: `IPV6_FLOWINFO_FLOWLABEL' undeclared
(first
use this function)
../../cppsocketapi/tdsocket.icc:91: (Each undeclared identifier is reported
only once for each function it appears in.)
../../cppsocketapi/tdsocket.icc: In member function `card8
Socket::getSendTrafficClass() const':
../../cppsocketapi/tdsocket.icc:98: `IPV6_FLOWINFO_PRIORITY' undeclared
(first
use this function)
../../cppsocketapi/tdsocket.icc: In member function `ssize_t
Socket::receive(void*, unsigned int, unsigned int)':
../../cppsocketapi/tdsocket.icc:230: `SocketAddress' undeclared (first use
this
function)
../../cppsocketapi/tdsocket.icc:230: parse error before `::' token
../../cppsocketapi/tdsocket.icc:231: parse error before `::' token
../../cppsocketapi/tdsocket.icc:235: `socketAddressBuffer' undeclared (first
use this function)
../../cppsocketapi/tdsocket.icc: At global scope:
../../cppsocketapi/tdsocket.icc:276: parse error before `&' token
../../cppsocketapi/tdsocket.icc: In member function `bool
Socket::addMulticastMembership(...)':
../../cppsocketapi/tdsocket.icc:279: `address' undeclared (first use this
function)
../../cppsocketapi/tdsocket.icc:279: `interface' undeclared (first use this
function)
../../cppsocketapi/tdsocket.icc: At global scope:
../../cppsocketapi/tdsocket.icc:284: parse error before `&' token
In file included from ../../socketapi/tdmessage.h:44,
from sctpmultiserver.cc:53:
../../socketapi/socketaddress.h:58: `struct SocketAddress' used prior to
declaration
sctpmultiserver.cc:54:43: ../../cppsocketapi/randomizer.h: No such file or
directory
In file included from sctpmultiserver.cc:55:
../../cppsocketapi/breakdetector.h:46:22: tdsystem.h: No such file or
directory
In file included from sctpmultiserver.cc:58:
sctpinfoprinter.h:47:22: tdsystem.h: No such file or directory
In file included from sctpmultiserver.cc:59:
sctptftp.h:48:22: tdsystem.h: No such file or directory
sctpmultiserver.cc: In member function `virtual void MultiServer::run()':
sctpmultiserver.cc:725: no matching function for call to `Socket::accept(
SocketAddress**)'
sctpmultiserver.cc: In function `int main(int, char**)':
sctpmultiserver.cc:904: `InternetAddress' undeclared (first use this
function)
sctpmultiserver.cc:904: parse error before `::' token
***************************************
I would be grateful if anyone could help me.
Cheers,
Djuneid
- [SCTP-Discussion] compile error, Djuneid Dillun, 07/23/2004
Archive powered by MHonArc 2.6.19+.