Qt World Summit: Register Today!

Cross compiling for windows - passing extra include paths to host gcc (Qt5.2.1)

  • I'm trying to cross compile Qt 5.2.1 from linux (Ubunut 14.04) to windows. The build is failing in a few places when tools (which presumably should run on the build host) try to include <windows.h>. I have this available on my system for the mingw toolchain, but need to pass this location over to regular gcc - is there a switch available for configure to do this?


  • configure for Qt 5.3.1 has -I for extra include paths, -L for libraries,-D for extra defines.
    I think it should available for 5.2.1 too.

  • The -I option for configure indeed works; sadly the mingw headers (Ubuntu 14.04 deb) explicitly fail compilation if the target isn't Win32 so rather than burn more time on this, I'll look at switching the offending tools to cross compile.

    I'm far from certain what the expected target is for the Qt tools when cross compiling; should SDK bundled tools build for the host or target?

Log in to reply