Linking an external static library in an openFrameworks project

I am new to openFrameworks and qtcreator/qbs (and quite impressed with the framework’s capabilities). My operating system is desktop arch linux. I have searched for what seems like such a basic information including in the Qbs Quick Reference and the full Qbs Manual but can’t figure out how to proceed.

This is the situation:

I have compiled an external library (cpr - https://github.com/whoshuu/cpr. Note that the library seems to have compiled without problem since a sample app runs fine.

The library header files are in ../apps/myApps/mysketch/cpr/include and the static library, libcpr.a, is in ../apps/myApps/mysketch/cpr/lib.

I’ve edited my original note since initially I was trying to edit ofApp.qbs, which I assume is a bad idea. I am now editing mysketch.qbs, which is where I am presuming that the changes should go. Simply adding of.staticLibraries['cpr'] and doing the same for of.includePaths does not change the message “cannot find -lcpr”

Note that my openFrameworks program compiles fine if I remove the code related to the external cpr library.

I would be very appreciate if someone could point me in the right direction. Thanks,

Steve

OK. Some progress. Adding to Depends { name: "cpp" ...

cpp.staticLibraries: ['cpr']

does get it to compile but I still can’t get the app to run. I have to give the absolute path to the include for the header file cpr.h , which doesn’t seem like a good sign, and then I get a bunch of undefined references like:

undefined reference to 'cpr::Session::Session()

It seems possible that the binary can’t find the library but I’ve played with cpp.libraryPaths and cpp.IncludePaths and can’t figure out what they’re looking for. Or maybe there is some other problem.

Thanks again for any pointers.

Steve