[Qbs] avoid RPATH pointing to Qt installation folder

Jochen Ulrich jochen.ulrich at clausmark.com
Tue Oct 8 11:05:33 CEST 2019

> If I just set
>     cpp.rpaths: [ ]
> then I get a linker error wrt. missing ICU libs?

You should try setting the RPATHs to an array of paths which tell the loader where to find the libraries.

For example, if your deployment looks like this:

myApp/bin/myApp (the executable)

you might be able to do something like this for the executable:

    cpp.rpaths: [ "$ORIGIN/../lib" ]

However, note that you might require different RPATHs during development if you want to run the executable without setting up the complete deployment directory structure first.

Also note that there are certain security issues with RPATHs. See for example https://security.stackexchange.com/a/165762/125269

Kind regards
Jochen Ulrich

More information about the Qbs mailing list