This is the mail archive of the cygwin mailing list for the Cygwin project.

Index Nav: Message Nav: [Date Index] [Subject Index] [Author Index] [Thread Index] [Date Prev] [Date Next] [Thread Prev] [Thread Next] [Raw text]

# can some one please help me fix compiling errors related to winsock and sys/types and fd_set...etc

• From: Josh <darkorange74 at yahoo dot com>
• To: cygwin at cygwin dot com
• Date: Thu, 24 Dec 2009 21:12:10 -0800 (PST)
• Subject: can some one please help me fix compiling errors related to winsock and sys/types and fd_set...etc

```I have a 64bit Vista machine.

Please help me fix these two errors so I can compile, they seem to be related to winsock in some way

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 model.c t
iming.c light.c ext.c os.c net.c crypt.c -L"./gl" -lopengl32 -lglu32 -lkernel32
-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/types.
??? 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 function 'si
n'
main.c:3458: warning: incompatible implicit declaration of built-in function 'co
s'
main.c:3479: warning: incompatible implicit declaration of built-in function 'si
n'
main.c:3481: warning: incompatible implicit declaration of built-in function 'co
s'
main.c:3502: warning: incompatible implicit declaration of built-in function 'co
s'
main.c:3504: warning: incompatible implicit declaration of built-in function 'si
n'
main.c:3522: warning: incompatible implicit declaration of built-in function 'co
s'
main.c:3524: warning: incompatible implicit declaration of built-in function 'si
n'
main.c:3793: warning: incompatible implicit declaration of built-in function 'co
s'
main.c:3795: warning: incompatible implicit declaration of built-in function '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 function 'si
n'
main.c:3877: warning: incompatible implicit declaration of built-in function 'si
n'
main.c:3879: warning: incompatible implicit declaration of built-in function 'co
s'
main.c:3920: warning: incompatible implicit declaration of built-in function 'si
n'
main.c:3922: warning: incompatible implicit declaration of built-in function '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 function 's
qrtf'
interface.c: In function 'draw_arrow':
interface.c:3392: warning: incompatible implicit declaration of built-in functio
n 'acosf'
In file included from net.h:7,
???????????????? 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/types.
??? 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 installed and the path variable set with
export PATH=\$PATH:/bin:/usr/bin

for command like ls and such

and

export PATH=\$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.

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 some 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 =)? Well that's where I got so far in compiling I'll continue to research for a fix for this.

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 includes 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

--
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

```

• Follow-Ups:
Index Nav: Message Nav: [Date Index] [Subject Index] [Author Index] [Thread Index] [Date Prev] [Date Next] [Thread Prev] [Thread Next]