After fighting heavily with BCC5.5 i turned to Dev-C++.

My progs were compiling well with code (this is an example from Jonnie's site):

#include <winsock.h> // winsock.h always needs to be included
#include <stdio.h>


int main(int argc, char** argv) {
WORD version = MAKEWORD(1,1);
WSADATA wsaData;
int nRet;


//
// First, we start up Winsock
//
WSAStartup(version, &wsaData);


//
// Next, create the socket itself
//
SOCKET listeningSocket;

listeningSocket = socket(AF_INET, // Go over TCP/IP
SOCK_STREAM, // Socket type
IPPROTO_TCP); // Protocol
if (listeningSocket == INVALID_SOCKET) {
printf("Error at socket()");
return 0;
}


//
// Use SOCKADDR_IN to fill in address information
//
SOCKADDR_IN saServer;

saServer.sin_family = AF_INET;
saServer.sin_addr.s_addr = INADDR_ANY; // Since this is a server, any address will do
saServer.sin_port = htons(8888); // Convert int 8888 to a value for the port field


//
// Bind the socket to our local server address
//
nRet = bind(listeningSocket, (LPSOCKADDR)&saServer, sizeof(struct sockaddr));
if (nRet == SOCKET_ERROR) {
printf("Error at bind()");
return 0;
}


//
// Make the socket listen
//
nRet = listen(listeningSocket, 10); // 10 is the number of clients that can be queued
if (nRet == SOCKET_ERROR) {
printf("Error at listen()");
return 0;
}


//
// Wait for a client
//
SOCKET theClient;

theClient = accept(listeningSocket,
NULL, // Wait for a specific address to connect; here there is none
NULL);
if (theClient == INVALID_SOCKET) {
printf("Error at accept()");
return 0;
}


// Send/receive from the client, and finally:

closesocket(theClient);
closesocket(listeningSocket);


//
// Shutdown Winsock
//
WSACleanup();
}


now it does compile BUT:

C:\DOCUME~1\ADMINI~1.OKT\LOCALS~1\Temp\ccS4aaaa.o( .text+0x6c):test4.cpp: undefined reference to `WSAStartup@8'
C:\DOCUME~1\ADMINI~1.OKT\LOCALS~1\Temp\ccS4aaaa.o( .text+0x7d):test4.cpp: undefined reference to `socket@12'
C:\DOCUME~1\ADMINI~1.OKT\LOCALS~1\Temp\ccS4aaaa.o( .text+0xcc):test4.cpp: undefined reference to `htons@4'
C:\DOCUME~1\ADMINI~1.OKT\LOCALS~1\Temp\ccS4aaaa.o( .text+0xf0):test4.cpp: undefined reference to `bind@12'
C:\DOCUME~1\ADMINI~1.OKT\LOCALS~1\Temp\ccS4aaaa.o( .text+0x12d):test4.cpp: undefined reference to `listen@8'
C:\DOCUME~1\ADMINI~1.OKT\LOCALS~1\Temp\ccS4aaaa.o( .text+0x16f):test4.cpp: undefined reference to `accept@12'
C:\DOCUME~1\ADMINI~1.OKT\LOCALS~1\Temp\ccS4aaaa.o( .text+0x1ab):test4.cpp: undefined reference to `closesocket@4'
C:\DOCUME~1\ADMINI~1.OKT\LOCALS~1\Temp\ccS4aaaa.o( .text+0x1bd):test4.cpp: undefined reference to `closesocket@4'
C:\DOCUME~1\ADMINI~1.OKT\LOCALS~1\Temp\ccS4aaaa.o( .text+0x1c5):test4.cpp: undefined reference to `WSACleanup@0'

Happens!!!!!

Help me pls

Why cant Win compilers be like *NIX compilers, my stuff is seamless on *NIX, why not on Win????

oktech