WINSOCK GODDAMNIT
I am used to mingw32, and want to keep on using it.
Is there a way to use winsock with mingw32 ?
I really need this...
Thx for your help, in advantage
Nothing and all, by some meaning, no difference
Nothing and all, by some meaning, no difference
Dev-C++ has libraries for both WinSock 1 & 2 and uses mingw32, so try that.
Hmm i'm using DevC++ and trying to get just a simple Windows Winsock program to compile. I keep getting unresolved linking errors when i try to call winsock functions as shown below..
[Linker error] undefined reference to `socket@12'
everytime.. is there anything i need to add.. here is the code i'm trying to compile and i've setup a Windows Console project application.. it's driving me nuts.. any help would be apprecieated!!
[edited by - tonic151 on February 20, 2003 1:14:34 PM]
[Linker error] undefined reference to `socket@12'
everytime.. is there anything i need to add.. here is the code i'm trying to compile and i've setup a Windows Console project application.. it's driving me nuts.. any help would be apprecieated!!
#include <windows.h>#include <winsock.h>int main(void){ SOCKADDR_IN sin; SOCKET s; int sin_len; s = socket(AF_INET,SOCK_STREAM,0); if (s == INVALID_SOCKET) { // Socket failed } sin.sin_family = AF_INET; sin.sin_addr.s_addr = 0; sin.sin_port = htons(100); // port=100 if (bind(s, (struct sockaddr FAR *)&sin, sizeof (sin)) == SOCKET_ERROR) { // Bind failed } if (listen(s,4)<0) { // Listen failed } sin_len = sizeof(sin); s=accept(s,(struct sockaddr FAR *) & sin,(int FAR *) &sin_len); if (s==INVALID_SOCKET) { // Accept failed } return(0);}
[edited by - tonic151 on February 20, 2003 1:14:34 PM]
quote:
Original post by llyod
Try linking with wsock32.lib
2DNow - Yesteryears technology at your fingertips!
Thanks i got it working..
![](smile.gif)
[edited by - tonic151 on February 20, 2003 3:12:52 PM]
This topic is closed to new replies.
Advertisement
Popular Topics
Advertisement
Recommended Tutorials
Advertisement