WSAStartup error when compile

Using applications, configuring, problems
Post Reply
Message
Author
ghostshadow189
Posts: 34
Joined: Thu 24 Nov 2005, 05:06

WSAStartup error when compile

#1 Post by ghostshadow189 »

When I use gcc to compile some .c file , I have error like that :

Code: Select all

ne0.c: In function `funk':
ne0.c:111: warning: function returns address of local variable
/tmp/ccb5wgCD.o(.text+0x81): In function `funk':
: undefined reference to `WSAStartup'
/tmp/ccb5wgCD.o(.text+0x246): In function `main':
: undefined reference to `WSAStartup'
/tmp/ccb5wgCD.o(.text+0x5da): In function `main':
: undefined reference to `closesocket'
/tmp/ccb5wgCD.o(.text+0x5e2): In function `main':
: undefined reference to `WSACleanup'
collect2: ld returned 1 exit status
I've the same error (undefined reference to `WSAStartup' and undefined reference to `WSACleanup' or something like that) when I compile some another files.
So can u help me fix it ? Thanks so much :wink:

menno
Posts: 80
Joined: Thu 03 Nov 2005, 23:21
Location: Bedum (Nederland)
Contact:

error

#2 Post by menno »

As far I know , your program uses winsock32 . That doesn't work in linux .
May you can remove this calls . A other fact is that windows use send() instead of write() . But some GCC understand both .

Post Reply