Hi everyone,
I need help about this situation.
I need to create a socket (client/server) in a 64bit application on Visual C++ 2010 in a windows 7 64bit system.
As example, my tutor link me this class
http://cs.baylor.edu/~donahoo/practical/CSockets/practical/
But it's too old, and seems made for only 32 bit application.
I've tried to compile an example of that available (TCPEchoClient.cpp) but visual C++ give me these errors:
1>------ Inizio compilazione: Progetto: sockt, Configurazione: Debug Win32 ------<br />
1>Compilazione avviata 19/03/2014 08:22:42.<br />
1>InitializeBuildStatus:<br />
1> Aggiornamento timestamp di "Debug\sockt.unsuccessfulbuild".<br />
1>ClCompile:<br />
1> Tutti gli output sono aggiornati.<br />
1>ManifestResourceCompile:<br />
1> Tutti gli output sono aggiornati.<br />
1>TCPEchoClient.obj : error LNK2019: riferimento al simbolo esterno "public: int __thiscall CommunicatingSocket::recv(void *,int)" (?recv@CommunicatingSocket@@QAEHPAXH@Z) non risolto nella funzione _main<br />
1>TCPEchoClient.obj : error LNK2019: riferimento al simbolo esterno "public: void __thiscall CommunicatingSocket::send(void const *,int)" (?send@CommunicatingSocket@@QAEXPBXH@Z) non risolto nella funzione _main<br />
1>TCPEchoClient.obj : error LNK2019: riferimento al simbolo esterno "public: __thiscall TCPSocket::TCPSocket(class std::basic_string<char,struct std::char_traits<char>,class std::allocator<char> > const &,unsigned short)" (??0TCPSocket@@QAE@ABV?$basic_string@DU?$char_traits@D@std@@V?$allocator@D@2@@std@@G@Z) non risolto nella funzione _main<br />
1>TCPEchoClient.obj : error LNK2019: riferimento al simbolo esterno "public: __thiscall Socket::~Socket(void)" (??1Socket@@QAE@XZ) non risolto nella funzione "public: __thiscall CommunicatingSocket::~CommunicatingSocket(void)" (??1CommunicatingSocket@@QAE@XZ)<br />
1>C:\OPENCV\Test\miei\provefunzioni\sockt\Debug\sockt.exe : fatal error LNK1120: 4 esterni non risolti<br />
1><br />
1>Compilazione NON RIUSCITA.
Now, I think it's about the library that this class need, and I've found on google that wsock32.lib it's replaced on windows 7 with a dll, ws2_32.dll, that contain the 32 and 64 bit version of that lib.
I've found it on
C:\Program Files (x86)\Microsoft SDKs\Windows\v7.0A\Lib\x64
but, even I set this path for "additional library" the program don't compile.
How can I use this class on my 64bit project?
Or, someone can tell me a simple mode to create a socket client/server in a 64bit project of visual c++ 2010 on Windows 7 64bit??
Thanks in advance.