I am trying to compile QT for ARM. But the linker requires "--sysroot" option to be added for linking files. So in qmake.conf file, we add开发者_StackOverflowed under QMAKE_LFLAGS.
But when we compile, its adding this even for initial tools build on the x86 PC. So gcc complains and gives error.
The cross compiler tool chain which doesnt have a .pc file.
Please let me know where to add the "--sysroot" so that this is added only when it tries to cross compile.
Thanks. Hari
You can do this using qmake scopes - specifically platform scope variables. To ensure that -sysroot
is only evaluated for your ARM builds you can do something like this:
arm-linux: {
QMAKE_LFLAGS += --sysroot
}
You may need to change the scope, depending on the platform you're actually targetting.
精彩评论