Compiling and Linking Third Party Libraries in VS 2015

Compiling and linking third party libraries in VS 2015

adding to the linker is not enough you need also to add the include library:
properties -> C/C++ ->general -> additional include directories

Linking against third-party libraries when doing cross-platform build in Visual Studio 2015

First, the Opus Codec distribution comes with Visual Studio projects that are configured to build only Windows libraries, which are not cross-platform. You need to replace these projects with Cross Platform Library projects. Or better alternative: just download prebuilt libopus.a, e.g. from here.

Second, you cannot use #pragma comment(lib, ...) in cross-platform projects. Instead, add library dependencies to the project properties: add opus to Configuration Properties -> Linker -> Input -> Library Dependencies; also add path to the folder containing libopus.a to Configuration Properties -> Linker -> General -> Additional Library Directories.

Third, it looks like you are trying to use some version of clang.exe by placing it in the root of your project (your linker error shows this). It must be very wrong. Instead, you need to use Clang that comes with Android NDK. (Make sure the NDKROOT environment variable points the root of Android NDK installation.)

Linking 3rd Party Libraries with VS Cross-Platform C++ Mobile App Project

Instead of banging my head on this any longer, I decided to build the libraries myself within the solution rather than link to them externally. (The provided Visual Studio templates make it trivial to drop in existing and have it work across all your projects right out of the box.)

This is less of an answer then an alternate solution, but it was the route I ended up taking, and in the end I think it was perhaps the better choice. (To state the obvious, if I end up needing those libraries for multiple projects, then this isn't the most efficient approach. But for now it wasn't worth the headache for me.)

Should anyone ever come across this question in the future and have an answer I would still very much appreciate hearing their input!



Related Topics



Leave a reply



Submit