I'm developing a server application that must use the winsock api under windows. when i compile my program with mingw, i get the following errors at the link step:
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17
C:\DOCUME~1\WDOUGL~1\LOCALS~1\Temp/ccet1QMR.o: In function `server_thread':
T:\wed\winroute/uslnplib.c:689: undefined reference to `listen@8'
T:\wed\winroute/uslnplib.c:695: undefined reference to `AcceptEx@32'
T:\wed\winroute/uslnplib.c:710: undefined reference to `closesocket@4'
C:\DOCUME~1\WDOUGL~1\LOCALS~1\Temp/ccet1QMR.o: In function `init_uslnplib':
T:\wed\winroute/uslnplib.c:727: undefined reference to `WSAStartup@8'
C:\DOCUME~1\WDOUGL~1\LOCALS~1\Temp/ccet1QMR.o: In function `start_server':
T:\wed\winroute/uslnplib.c:782: undefined reference to `getaddrinfo@16'
T:\wed\winroute/uslnplib.c:797: undefined reference to `socket@12'
T:\wed\winroute/uslnplib.c:802: undefined reference to `freeaddrinfo@4'
T:\wed\winroute/uslnplib.c:803: undefined reference to `WSACleanup@0'
T:\wed\winroute/uslnplib.c:807: undefined reference to `setsockopt@20'
T:\wed\winroute/uslnplib.c:811: undefined reference to `closesocket@4'
T:\wed\winroute/uslnplib.c:815: undefined reference to `bind@12'
T:\wed\winroute/uslnplib.c:818: undefined reference to `freeaddrinfo@4'
T:\wed\winroute/uslnplib.c:819: undefined reference to `closesocket@4'
T:\wed\winroute/uslnplib.c:820: undefined reference to `WSACleanup@0'