Question is for solving this issue in qbs:
Here is a file generated by QtCreator. I added in
cpp.dynamicLibraries:[
"/usr/lib/qconsoledesigner/libqconsoletoolkit.so"
]
in
CppApplication {
Depends { name: "Qt.core" }
Depends { name: "Qt.network" }
cpp.cxxLanguageVersion: "c++11"
cpp.defines: [
"QT_DEPRECATED_WARNINGS",
]
cpp.dynamicLibraries:[
"/usr/lib/qconsoledesigner/libqconsoletoolkit.so"
]
consoleApplication: true
files: "main.cpp"
Group { // Properties for the produced executable
fileTagsFilter: "application"
qbs.install: true
}
}
Here is the main();
#include <QCoreApplication>
#include "qconsoledesigner/qconsoletoolkit.h"
int main(int argc, char *argv[])
{
QCoreApplication a(argc, argv);
QConsoleToolkit ct;
return a.exec();
}
Everything builds fine. Running produces this error:
/home/.../qtc_Desktop_Qt_5_10_1_GCC_64bit_qt_qt5_Debug/install-root/MyProject:
error while loading shared libraries:
libqconsoletoolkit.so:
cannot open shared object file:
No such file or directory
Before I physically copy that .so into my install root, I know there must be a QBS property that I can set.
I have tried playing around with the various path related properties in https://doc.qt.io/qbs/qml-qbsmodules-cpp.html, but I am very much groping in the dark.
Thanks.