I want to use oscpack (http://code.google.com/p/oscpack/) as a static library for my project but when I try to add it to an example, I get linking errors, for example:
1>oscpackd.lib(UdpSocket.obj) : error LNK2019: unresolved external symbol __imp__socket@12 referenced in function "public: __thiscall UdpSocket::Implementation::Implementation(void)" (??0Implementation@UdpSocket@@QAE@XZ)
1>oscpackd.lib(UdpSocket.obj) : error LNK2019: unresolved external symbol __imp__closesocket@4 referenced in function "public: __thiscall UdpSocket::Implementation::~Implementation(void)" (??1Implementation@UdpSocket@@QAE@XZ)
...
Basically, I created a solution for building the oscpack.lib, in the project I added the corresponding .h and .cpp files.
Then on the example solution, I added my main.cpp and then I included (properties>C/C++>Additional Include Directories) the folder of the oscpack library, then on the Linker tab I added the folder location of the libs and the name of the libs.
See Question&Answers more detail:os