void Timer::Sleep(int milisec) {
#ifdef _WIN32
Sleep(milisec);
#else
usleep(milisec * 1000);
#endif
}
Code compiles, but when I run the program it crashes and I've no idea why. Next problem I have is with Socket class; again the code compiles but when I try to run it I get undefined reference errors to Win API functions like undefined reference to `_WSAStartup@8', undefined reference to `_socket@12' and so on.I'm following Static Libraries: (.a) method found here
Any help would be much appreciated.


Sign In
Create Account


Back to top









