i don't have too much experience of using MS Visual Studio, therefore i need some help. i am trying to write a program using WinSock in Visual C++, so could someone tell be what i need to do to include the "winsock.h" header file, in MS Visual Studio. Beyond the following.
i've tried a number of solutions that i have found on the net, but non of them have completely worked. therefore could anyone help me?
thanks in advance,
April 23rd, 2008, 10:48 PM
That is actually all you need to do. If that's not working, then you have problems somewhere else. What problems are you having with it, exactly?
April 23rd, 2008, 10:55 PM
when i try to use WSAStartup(), then i get a build error. that says:
error LNK2019: unresolved external symbol _WSAStartup@8 referenced in function _main
which is why i think that the "winsock.h" library has not been included in the build. what do you think?
April 23rd, 2008, 11:58 PM
I haven't opened Visual Studio in years and I never used it for anything but Visual Basic, but as I recall there was a setting where you had to import a whole package that contained each library that you intend to reference. It's been too many years for me to tell you where to look and I have no idea how much the program has changed in that time.
I had to do such an import myself just to reference the scripting.filesystem object.
April 24th, 2008, 12:37 AM
that's what i was thinking, that i may have to import the header file into my project.
but, im not sure how to do that. all the attempts that i have made have been unsuccessful ;-(.
although, i could easily be mistaken! anyone, that has any ideas how i could resolve this problem, please let me know.
April 24th, 2008, 07:26 PM
thanks for your help guys, but i've worked out the answer to my own question! what i needed to do was, on the menus, go to:
Another way that you can get an idea of whether the issue is a compiler or a linker problem is by looking at the error codes. Compiler problems start with Cxxxx whereas linker problems start with LNKxxxx.
A good way to get help on these problems is to search by that error code.