I am attempting to compile John Burger's StdTel for Windows 98. I am using Pelles C, because it has Windows 98 support, but it appears that I don't have the necessary libraries. This is the compiler's output:
Building StdTel.obj.
C:\StdTel\StdTel.c(76): warning #2145: Assignment of 'char * *' to 'const char * const *'.
Building StdTel.exe.
POLINK: error: Unresolved external symbol '__imp__WSAGetLastError@0'.
POLINK: error: Unresolved external symbol '__imp__htons@4'.
POLINK: error: Unresolved external symbol '__imp__connect@12'.
POLINK: error: Unresolved external symbol '__imp__send@16'.
POLINK: error: Unresolved external symbol '__imp__shutdown@8'.
POLINK: error: Unresolved external symbol '__imp__WSAStartup@8'.
POLINK: error: Unresolved external symbol '__imp__gethostbyname@4'.
POLINK: error: Unresolved external symbol '__imp__getservbyname@8'.
POLINK: error: Unresolved external symbol '__imp__ntohs@4'.
POLINK: error: Unresolved external symbol '__imp__socket@12'.
POLINK: error: Unresolved external symbol '__imp__setsockopt@20'.
POLINK: error: Unresolved external symbol '__imp__closesocket@4'.
POLINK: error: Unresolved external symbol '__imp__recv@16'.
POLINK: fatal error: 13 unresolved external(s).
*** Error code: 1 ***
Done.
So that you don't have to open up the program source, here's the relevant section:
#define STRICT
#define WIN32_LEAN_AND_MEAN
#define WINVER _WIN32_WINNT_NT4 // Earliest available option to Windows 98
#define _WIN32_WINNT _WIN32_WINNT_NT4
#define _WINSOCK_DEPRECATED_NO_WARNINGS
#include <Windows.h>
#include <WinSock2.h>
#include <io.h>
#include <fcntl.h>
#include <stdio.h>
#include <stdlib.h>
I also tried specifying Windows version 2.10 (guestimated from this code snippet), but it didn't appear to have any effect.