How do I 'build a C++ library'? I am trying to use an SDK (http://mac.softpedia.com/get/Development/Libraries/oscpack.shtml) but the files don't include any .lib or .dll files. I'm told I need to just 'build my own library', but have absolutely no clue what this means!
3 Answers
Did you read this?
Oscpack is a free and open source library, a set of C++ classes for packing and unpacking OSC packets.
Oscpack is not an OSC application framework, it doesn't include infrastructure for constructing or routing OSC namespaces, just classes for easily constructing, sending, receiving and parsing OSC packets.

- 202,538
- 53
- 430
- 533
-
In short, you just include the files you need and they will be compiled at the same time as your Game. – 3nixios May 27 '11 at 15:40
You don't need to build a library. You can just add the .cpp files to your compile command.
g++ -o test main.cpp file1.cpp file2.cpp

- 34,653
- 44
- 154
- 278
If this is a Visual Studio project you can just add a new project to your current solution. You should make the new project a static lib
project. You should then reference the new project from your current project. (This will make Visual Studio build the second project and link it to the first when you build the first)
You can then copy the source files from where you downloaded them into the new folder that Visual Studio created. You can select them all and drag them into the new project.
You will then need to add Additional Include Directories
to the first project so that #include
statements work.

- 37,849
- 12
- 53
- 71
-
Thanks! How do I reference the 2nd project from the 1st? Is this something I build into the code or something I change in VC++? – Matt May 27 '11 at 17:55
-
@Matt: Right click on the project/properties/Common Properties/Framework and References. Click `Add New Reference...` and select the second project and click OK. – quamrana May 27 '11 at 19:14