|
From: Vlada D. <dj...@im...> - 2003-11-13 07:27:32
|
You need to link winsock library. Go to Project>Project options>Linker = options and add a line like -lyourlib, where yourlib is the library you = need to link. For winsock, I think it should be ws2_32 (or maybe = wsock32). ----- Original Message -----=20 From: Marcelo Telles=20 To: dev...@li...=20 Sent: Wednesday, November 12, 2003 8:59 PM Subject: [Dev-C++] linker error Hi. I got this errors when try to compile a code with winsock2.h. I searched, but didn't find anything... can somebody help me? Thanks. C:\TEMP/ccsjaaaa.o(.text+0x416):cliente_TCP.cpp: undefined reference = to `WSAStartup@8' C:\TEMP/ccsjaaaa.o(.text+0x437):cliente_TCP.cpp: undefined reference = to `socket@12' C:\TEMP/ccsjaaaa.o(.text+0x454):cliente_TCP.cpp: undefined reference = to `WSAGetLastError@0' C:\TEMP/ccsjaaaa.o(.text+0x49c):cliente_TCP.cpp: undefined reference = to `htons@4' C:\TEMP/ccsjaaaa.o(.text+0x4b5):cliente_TCP.cpp: undefined reference = to `inet_addr@4' C:\TEMP/ccsjaaaa.o(.text+0x4f4):cliente_TCP.cpp: undefined reference = to `gethostbyname@4' C:\TEMP/ccsjaaaa.o(.text+0x596):cliente_TCP.cpp: undefined reference = to `connect@12' C:\TEMP/ccsjaaaa.o(.text+0x5b3):cliente_TCP.cpp: undefined reference = to `WSAGetLastError@0' C:\TEMP/ccsjaaaa.o(.text+0x608):cliente_TCP.cpp: undefined reference = to `send@16' C:\TEMP/ccsjaaaa.o(.text+0x622):cliente_TCP.cpp: undefined reference = to `WSAGetLastError@0' C:\TEMP/ccsjaaaa.o(.text+0x694):cliente_TCP.cpp: undefined reference = to `recv@16' C:\TEMP/ccsjaaaa.o(.text+0x6ae):cliente_TCP.cpp: undefined reference = to `WSAGetLastError@0' C:\TEMP/ccsjaaaa.o(.text+0x722):cliente_TCP.cpp: undefined reference = to `closesocket@4' C:\TEMP/ccsjaaaa.o(.text+0x72a):cliente_TCP.cpp: undefined reference = to `WSACleanup@0' ----- www3.solar.com.br/~mstelles Don't worry about life; you're not going to survive it anyway. -------------------------------------------------------------------------= ----- Yahoo! Mail - 6MB, anti-spam e antiv=EDrus gratuito. Crie sua conta = agora! |