Solved How to set sysroot correctly
-
I set up a cross-compile environment for Qt5.9. In QtCreator > Options > Build & Run > Kits I selected my sysroot folder, that look like this:
sysroot lib opt usr
Here there are both cross-compiled Qt5 libraries and all other system ones. QtCreator find the Qt5 ones without any problem but can't find (some) others. For example I have the following library:
sysroot/usr/lib/arm-linux-gnueabihf/libtag.so
and in my .pro file:
LIBS += -ltag
but it cannot find it, neither the include file (
sysroot/usr/include/libtag/tag.h
).
Of course if I explicitly set the-L
option to the right path it works, but I really don't want to do this because I will have to do for a lot of others.As far as I understand it should search into the sysroot path, shouldn't it?
-
-
Well, eventually I found there were two sysroot folders, likely due to a typo in the scripts... hence it was searching in the wrong one.