Reputation: 31
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!
Upvotes: 1
Views: 1721
Reputation: 39354
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.
Upvotes: 0
Reputation: 35485
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
Upvotes: 1
Reputation: 206498
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.
Upvotes: 1