Communication Problem [modified]
-
Hi! I am trying to build my own Client Server in UDP. I have managed to create everything in classes. The problem is that when all the syntax errors finished, I am getting a link problems for all of the communication functions: sendto recvfrom WSACleanup closesocket and more. I have the library in the project: #include <winsock.h> The error is: Error 2 error LNK2019: unresolved external symbol _WSACleanup@0 referenced in function "public: void __thiscall CServer::Handle_Connection(void)" (?Handle_Connection@CServer@@QAEXXZ) CServer.obj Does anyone knows what is the problem? Thanks :) :)
modified on Thursday, April 16, 2009 1:17 PM
-
Hi! I am trying to build my own Client Server in UDP. I have managed to create everything in classes. The problem is that when all the syntax errors finished, I am getting a link problems for all of the communication functions: sendto recvfrom WSACleanup closesocket and more. I have the library in the project: #include <winsock.h> The error is: Error 2 error LNK2019: unresolved external symbol _WSACleanup@0 referenced in function "public: void __thiscall CServer::Handle_Connection(void)" (?Handle_Connection@CServer@@QAEXXZ) CServer.obj Does anyone knows what is the problem? Thanks :) :)
modified on Thursday, April 16, 2009 1:17 PM
-
Look at the documentation for WSACleanup, in the section called Requirements you will find a library that is required.
I have this library. I looked for other library and I tried it also and same problem. Error 1 error LNK2019: unresolved external symbol _sendto@24 referenced in function "public: void __thiscall CServer::Handle_Connection(void)" (?Handle_Connection@CServer@@QAEXXZ) CServer.obj Server Error 2 error LNK2019: unresolved external symbol _WSACleanup@0 referenced in function "public: void __thiscall CServer::Handle_Connection(void)" (?Handle_Connection@CServer@@QAEXXZ) CServer.obj Server Error 3 error LNK2019: unresolved external symbol _closesocket@4 referenced in function "public: void __thiscall CServer::Handle_Connection(void)" (?Handle_Connection@CServer@@QAEXXZ) CServer.obj Server all the communication functions????
-
I have this library. I looked for other library and I tried it also and same problem. Error 1 error LNK2019: unresolved external symbol _sendto@24 referenced in function "public: void __thiscall CServer::Handle_Connection(void)" (?Handle_Connection@CServer@@QAEXXZ) CServer.obj Server Error 2 error LNK2019: unresolved external symbol _WSACleanup@0 referenced in function "public: void __thiscall CServer::Handle_Connection(void)" (?Handle_Connection@CServer@@QAEXXZ) CServer.obj Server Error 3 error LNK2019: unresolved external symbol _closesocket@4 referenced in function "public: void __thiscall CServer::Handle_Connection(void)" (?Handle_Connection@CServer@@QAEXXZ) CServer.obj Server all the communication functions????
ytubis wrote:
I have this library.
'Having' it is not enough. Did you add it to the "Additional Dependencies" in your linker settings ?
Cédric Moonen Software developer
Charting control [v2.0 - Updated] OpenGL game tutorial in C++ -
I have this library. I looked for other library and I tried it also and same problem. Error 1 error LNK2019: unresolved external symbol _sendto@24 referenced in function "public: void __thiscall CServer::Handle_Connection(void)" (?Handle_Connection@CServer@@QAEXXZ) CServer.obj Server Error 2 error LNK2019: unresolved external symbol _WSACleanup@0 referenced in function "public: void __thiscall CServer::Handle_Connection(void)" (?Handle_Connection@CServer@@QAEXXZ) CServer.obj Server Error 3 error LNK2019: unresolved external symbol _closesocket@4 referenced in function "public: void __thiscall CServer::Handle_Connection(void)" (?Handle_Connection@CServer@@QAEXXZ) CServer.obj Server all the communication functions????
ytubis wrote:
and same problem. Error 1 error LNK2019: unresolved external symbol _sendto@24 referenced in function "public: void __thiscall CServer::Handle_Connection(void)"
No, that's NOT the same problem. It is another link error but now it's a different symbol. If you don't know how to resolve link errors then you need to return to basic C++ studies. Resolving link errors has nothing to do with Communications Problems, they are C++ beginner issues. THEREFORE, building a client server system is far beyond the capacity of someone that can't resolve link errors.
-
ytubis wrote:
I have this library.
'Having' it is not enough. Did you add it to the "Additional Dependencies" in your linker settings ?
Cédric Moonen Software developer
Charting control [v2.0 - Updated] OpenGL game tutorial in C++ -
This one I do not know how to do? Can you help me with this? Where and what do I need to do? Thanks :)
Open your project settings, go to the "Linker" category ->"Input" -> "Additional Dependencies" and there type the name of the required library (which is specified in the documentation).
Cédric Moonen Software developer
Charting control [v2.0 - Updated] OpenGL game tutorial in C++ -
ytubis wrote:
I have this library.
'Having' it is not enough. Did you add it to the "Additional Dependencies" in your linker settings ?
Cédric Moonen Software developer
Charting control [v2.0 - Updated] OpenGL game tutorial in C++This was one of the reasons I was slow to adopt MSVC. Makefiles are very clear, all the information is in one place, and their structure isn't that complex. Beats the hell out of,
"Did you scroll down the menu to the third setting,
pop up the second menu, choose Settings, then click on the color you wanted?" -
This was one of the reasons I was slow to adopt MSVC. Makefiles are very clear, all the information is in one place, and their structure isn't that complex. Beats the hell out of,
"Did you scroll down the menu to the third setting,
pop up the second menu, choose Settings, then click on the color you wanted?"That's just a matter of taste. The problem with makefiles is that you have to remember all the commands by heart (or look into a reference). When you have a UI that displays the settings, well, you just have to fill the one you want to. And they are grouped by category which makes things easier. I much prefer this compared to makefiles.
bulg wrote:
"Did you scroll down the menu to the third setting, pop up the second menu, choose Settings, then click on the color you wanted?"
It looks complicated but it's not: the reason is that everything is grouped into categories/sub-categories. What would you prefer: have a loooooong list of 200 entries or having everything grouped in categories ("Linker", "C/C++", ...) ?
Cédric Moonen Software developer
Charting control [v2.0 - Updated] OpenGL game tutorial in C++