|
From: Aleksei V. <vin...@ne...> - 2002-04-05 17:21:39
|
Hello, dev-cpp-users. A friend of mine who is not subscribed to the list asked me to send you this. Any help will be much appreciated. ------------ I tried to write the simplest program that uses WinSock interface. Here is a part of its source: //tcp.cpp #include <winsock.h> SOCKET S; word w; ... WSAStartup(w,&wsadata); S=Socket(AF_INET, SOCK_STREAM, 0); ... /////////////// After I compiled it, I got the following error messages: C:\WINDOWS\TEMP\cc9Rgigb.o(.text+0x1af):tcp.cpp: undefined reference to `WSAStartup@8' C:\WINDOWS\TEMP\cc9Rgigb.o(.text+0x1fa):tcp.cpp: undefined reference to `socket@12' ... OK, I changed #include <winsock.h> to #include <winsock2.h>, and got the following: Line7: c:\andrew\inet\#1\tcp.cpp C:\DEV-C_~1\INCLUDE\winsock2.h:46: unbalanced `#endif' What is it that may be causing the problem? ---- -- Best regards, Aleksei Vinidiktov Open Book - educational software for learning languages English: http://www.vinidiktov.com Russian: http://www.vinidiktov.com/rus vin...@ne... |