X-Recipient: archive-cygwin AT delorie DOT com X-SWARE-Spam-Status: No, hits=-1.1 required=5.0 tests=AWL,BAYES_00 X-Spam-Check-By: sourceware.org Message-ID: <333423.84515.qm@web112714.mail.gq1.yahoo.com> Date: Thu, 24 Dec 2009 21:12:10 -0800 (PST) From: Josh Subject: can some one please help me fix compiling errors related to winsock and sys/types and fd_set...etc To: cygwin AT cygwin DOT com MIME-Version: 1.0 Content-Type: text/plain; charset=iso-8859-1 Content-Transfer-Encoding: quoted-printable X-IsSubscribed: yes Mailing-List: contact cygwin-help AT cygwin DOT com; run by ezmlm List-Id: List-Subscribe: List-Archive: List-Post: List-Help: , Sender: cygwin-owner AT cygwin DOT com Mail-Followup-To: cygwin AT cygwin DOT com Delivered-To: mailing list cygwin AT cygwin DOT com I have a 64bit Vista machine. Please help me fix these two errors so I can compile, they seem to be relat= ed to winsock in some way PLEASE HELP I'm trying to compile a C program and here is what I'm getting: bash-3.2$ make -f Makefile gcc -O3 -oibsp.exe main.c gl.c string.c physics.c camera.c interface.c mode= l.c t iming.c light.c ext.c os.c net.c crypt.c -L"./gl" -lopengl32 -lglu32 -lkern= el32 -luser32 -lgdi32 -lwinmm -lcomdlg32 -lws2_32 -lzdll In file included from net.h:7, /usr/lib/gcc/i686-pc-cygwin/4.3.2/../../../../include/w32api/winsock2.h:103= :2: w arning: #warning "fd_set and associated macros have been defined in sys/typ= es. =A0=A0=A0 This may cause runtime problems with W32 sockets" In file included from main.c:22: net.h:30: warning: empty declaration main.c: In function 'main': main.c:3456: warning: incompatible implicit declaration of built-in functio= n 'si n' main.c:3458: warning: incompatible implicit declaration of built-in functio= n 'co s' main.c:3479: warning: incompatible implicit declaration of built-in functio= n 'si n' main.c:3481: warning: incompatible implicit declaration of built-in functio= n 'co s' main.c:3502: warning: incompatible implicit declaration of built-in functio= n 'co s' main.c:3504: warning: incompatible implicit declaration of built-in functio= n 'si n' main.c:3522: warning: incompatible implicit declaration of built-in functio= n 'co s' main.c:3524: warning: incompatible implicit declaration of built-in functio= n 'si n' main.c:3793: warning: incompatible implicit declaration of built-in functio= n 'co s' main.c:3795: warning: incompatible implicit declaration of built-in functio= n 'si n' main.c:3837: warning: incompatible implicit declaration of built-in function 'co s' main.c:3839: warning: incompatible implicit declaration of built-in functio= n 'si n' main.c:3877: warning: incompatible implicit declaration of built-in functio= n 'si n' main.c:3879: warning: incompatible implicit declaration of built-in functio= n 'co s' main.c:3920: warning: incompatible implicit declaration of built-in functio= n 'si n' main.c:3922: warning: incompatible implicit declaration of built-in functio= n 'co s' gl.c: In function 'matrix_rotate_x': gl.c:833: warning: incompatible implicit declaration of built-in function '= cosf' gl.c:834: warning: incompatible implicit declaration of built-in function '= sinf' gl.c: In function 'matrix_rotate_y': gl.c:855: warning: incompatible implicit declaration of built-in function '= cosf' gl.c:856: warning: incompatible implicit declaration of built-in function '= sinf' gl.c: In function 'matrix_rotate_z': gl.c:876: warning: incompatible implicit declaration of built-in function 'cosf' gl.c:877: warning: incompatible implicit declaration of built-in function '= sinf' gl.c: In function 'matrix_perspective': gl.c:898: warning: incompatible implicit declaration of built-in function '= tanf' physics.c: In function 'length': physics.c:53: warning: incompatible implicit declaration of built-in functi= on 's qrtf' interface.c: In function 'draw_arrow': interface.c:3392: warning: incompatible implicit declaration of built-in fu= nctio n 'acosf' In file included from net.h:7, =A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0 from net.c:1: /usr/lib/gcc/i686-pc-cygwin/4.3.2/../../../../include/w32api/winsock2.h:103= :2: w arning: #warning "fd_set and associated macros have been defined in sys/typ= es. =A0=A0=A0 This may cause runtime problems with W32 sockets" In file included from net.c:1: net.h:30: warning: empty declaration net.c: In function 'net_init': net.c:112: error: 'struct _types_fd_set' has no member named 'fd_count' net.c:113: error: 'struct _types_fd_set' has no member named 'fd_array' crypt.c: In function 'init_md5': crypt.c:69: warning: incompatible implicit declaration of built-in function= 'flo or' crypt.c:69: warning: incompatible implicit declaration of built-in function= 'sin ' crypt.c:69: warning: incompatible implicit declaration of built-in function= 'pow ' make: *** [ibsp.exe] Error 1 Alright I was able get Cygwin working and GCC and the makefile program inst= alled and the path variable set with export PATH=3D$PATH:/bin:/usr/bin for command like ls and such and export PATH=3D$PATH:/lib for gcc then I made a directory in /usr/ibs I put all of the ibs stuff there to be compiled. I did: make -f Makefile to run the make file. It gave me several warnings and two errors.=20 The two errors are: net.c:112: error: 'struct _types_fd_set' has no member named 'fd_count' net.c:113: error: 'struct _types_fd_set' has no member named 'fd_array' I have done some research and I think it is due to the winsock stuff in the= win32 api not compiling properly for some reason. I'm thinking there is so= me other version of the winsock.h and winsock2.h I need other then the ones= that came by default in C:\cygwin\usr\include\w32api . Soo this is what I'= m trying to figure out. Can someone please help =3D)? Well that's where I got so far in compiling I= 'll continue to research for a fix for this. I wanted add about the: net.c:112: error: 'struct _types_fd_set' has no member named 'fd_count' net.c:113: error: 'struct _types_fd_set' has no member named 'fd_array' It looks like net.c is trying to use a structure type of a structure defined in winsock.h. In this definition fd_count and fd_array are indeed = members. For some reason net.c can't see its members...I don't think the in= cludes have to be changed because this code was compiling and running just = fine on the previous developers machine. I'm thinking that the winsocck API= installed default from cygwin on my machine is different and needs patched= or changed in some way =20=20=20=20=20=20 -- Problem reports: http://cygwin.com/problems.html FAQ: http://cygwin.com/faq/ Documentation: http://cygwin.com/docs.html Unsubscribe info: http://cygwin.com/ml/#unsubscribe-simple