Important: Please read the Qt Code of Conduct -

Qt Creator Build Environment

  • I have Qt projects that have been building happily for some time, on a windows 7 platform using the SDK 7.1 compilers. All of a sudden these stopped building with errors compiling certain classes about not being able to find Windows.h or windows.h. I still don't know why this happened but my best guess is that it was down to an install of Filezilla that hung my system right near the end. I suepect I'll never really know. Various things that I read online lead to me to eventually re-install Visual Studio 2010, SDK 7.1 and a couple of service packs. Still things won't fully compile.

    I think we have now tracked the problem to the Build Environment setting for INCLUDE pointing to "Program Files (x86)" rather than "Program Files" which seems to be where 7.1 include files have been put by default. It isn't quite clear to me how these settings are determined? The documentation seems to say they come from the system environment and getting set directly by QtCreator. What is actually used to set this system environment? The 7.1 SetEnv.cmd does set INCLUDE correctly.

    Is there some sensible way around this other than re-installing things (again) using the (x86) directory rather than the default? I realize I can edit the build environment setting but these changes get lost with the pro.user file. My best (lazy) fix at the moment is to create what I believe is called a 'junction' on windows (link) into the (x86) directory.

    Many thanks


Log in to reply