From owner-freebsd-questions@FreeBSD.ORG Wed Mar 26 09:37:25 2003 Return-Path: Delivered-To: freebsd-questions@freebsd.org Received: from mx1.FreeBSD.org (mx1.freebsd.org [216.136.204.125]) by hub.freebsd.org (Postfix) with ESMTP id 4665737B404 for ; Wed, 26 Mar 2003 09:37:25 -0800 (PST) Received: from hermes.cicese.mx (hermes.cicese.mx [158.97.1.34]) by mx1.FreeBSD.org (Postfix) with ESMTP id 52A1443F85 for ; Wed, 26 Mar 2003 09:37:21 -0800 (PST) (envelope-from valencia@cicese.mx) Received: from matrix.cicese.mx (matrix.cicese.mx [158.97.23.247]) by hermes.cicese.mx (8.10.0/8.10.0) with ESMTP id h2QHbHJ23686 for ; Wed, 26 Mar 2003 09:37:17 -0800 (PST) Received: (from valencia@localhost) by matrix.cicese.mx (8.9.3+Sun/8.9.1) id JAA16145; Wed, 26 Mar 2003 09:37:15 -0800 (PST) Date: Wed, 26 Mar 2003 09:37:15 -0800 (PST) From: Jesus Daniel Valencia Sanchez To: freebsd-questions@freebsd.org In-Reply-To: <20030326034042.GA16205@gothmog.gr> Message-ID: MIME-Version: 1.0 Content-Type: TEXT/PLAIN; charset=US-ASCII X-Spam-Status: No, hits=-15.5 required=5.0 tests=AWL,EMAIL_ATTRIBUTION,IN_REP_TO,QUOTED_EMAIL_TEXT, REPLY_WITH_QUOTES,USER_AGENT_PINE autolearn=ham version=2.50 X-Spam-Level: X-Spam-Checker-Version: SpamAssassin 2.50 (1.173-2003-02-20-exp) Subject: Re: sockets X-BeenThere: freebsd-questions@freebsd.org X-Mailman-Version: 2.1.1 Precedence: list List-Id: User questions List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 26 Mar 2003 17:37:26 -0000 On Wed, 26 Mar 2003, Giorgos Keramidas wrote: > On 2003-03-25 19:07, Jesus Daniel Valencia Sanchez wrote: > > > > I'm using R4.6.2 and when i try to compile anything with the file > > sys/socket.h i get tons of error messages INSIDE that file. is > > there anything i should know about it? > > > > any help will be very appreciated > > Show us the exact command-line options you're using to compile your > programs with and the errors you're getting. > > - Giorgos > > > here you go [Equipo7] ~/programas/tontos> uname -a FreeBSD Equipo7.mat.uson.mx 4.6.2-RELEASE FreeBSD 4.6.2-RELEASE #0: Thu Feb 6 20:03:17 MST 2003 root@Equipo7.mat.uson.mx:/usr/src/sys/compile/GENERIC i386 [Equipo7] ~/programas/tontos> g++ -o server_1 server_1.cpp In file included from server_1.cpp:1: /usr/include/sys/socket.h:52: syntax error before `;' /usr/include/sys/socket.h:163: syntax error before `;' /usr/include/sys/socket.h:174: syntax error before `;' /usr/include/sys/socket.h:188: syntax error before `;' /usr/include/sys/socket.h:190: `int64_t' was not declared in this scope /usr/include/sys/socket.h:190: `u_char' was not declared in this scope /usr/include/sys/socket.h:190: `sa_family_t' was not declared in this scope /usr/include/sys/socket.h:190: size of array `__ss_pad1' is negative /usr/include/sys/socket.h:191: syntax error before `;' /usr/include/sys/socket.h:192: `u_char' was not declared in this scope /usr/include/sys/socket.h:192: `sa_family_t' was not declared in this scope /usr/include/sys/socket.h:192: `int64_t' was not declared in this scope /usr/include/sys/socket.h:192: `u_char' was not declared in this scope /usr/include/sys/socket.h:192: `sa_family_t' was not declared in this scope /usr/include/sys/socket.h:192: `int64_t' was not declared in this scope /usr/include/sys/socket.h:359: syntax error before `;' /usr/include/sys/socket.h:364: syntax error before `[' /usr/include/sys/socket.h:399: syntax error before `;' /usr/include/sys/socket.h:407: syntax error before `;' /usr/include/sys/socket.h:411: syntax error before `;' In file included from server_1.cpp:1: /usr/include/sys/socket.h:444: syntax error before `(' /usr/include/sys/socket.h:451: type specifier omitted for parameter /usr/include/sys/socket.h:451: type specifier omitted for parameter /usr/include/sys/socket.h:451: syntax error before `*' server_1.cpp: In function `int main()': server_1.cpp:16: syntax error before `,' server_1.cpp:17: `direl' undeclared (first use this function) server_1.cpp:17: (Each undeclared identifier is reported only once server_1.cpp:17: for each function it appears in.) server_1.cpp:17: `addr' undeclared (first use this function) server_1.cpp:17: implicit declaration of function `int bzero(...)' server_1.cpp:18: `direr' undeclared (first use this function) server_1.cpp:20: `INADDR_ANY' undeclared (first use this function) /usr/include/sys/socket.h:454: too few arguments to function `int socket(int, int, int)' server_1.cpp:27: at this point in file server_1.cpp:38: implicit declaration of function `int read(...)' server_1.cpp:43: syntax error before `if' server_1.cpp:47: implicit declaration of function `int close(...)' [Equipo7] ~/programas/tontos> cat server_1.cpp #include #include #include #include void error( char *s ) { . . . and my code goes on... thank you