Important: Please read the Qt Code of Conduct -

Unable to build qtwinextras with Qt 5.1.1 (fatal error C1083: Cannot open include file: 'QtWinExtras/qwinextrasglobal.h')

  • I am trying to include the qtwinextras module as part of my build process. I am not a qmake expert but tried to follow what I could dig up. I downloaded the tar file from gitorious and unpacked it into <qtroot>\qtwinextras and then edited <qtroot>\ w/ "addModule(qtwinextras, qtbase)". I am using a shadow build. I then ran configure and nmake. Nmake eventually failed build qtwinextras with the following error:

    fatal error C1083: Cannot open include file: 'QtWinExtras/qwinextrasglobal.h'

    I took a look at the include paths being used and (a) they were not accounting for my shadow build (which is annoying) but also (b) the qwinextrasglobal was not in the shadow build or in the original source include. It exists only in the original qtwinextras\src\winextras folder and is not being copied.

    So (a) why doesn't is this file not being copied and (b) related ... am I buildling this correctly.


  • Moderators


    If you're on Windows, you should grab the .zip file, not the .tar.gz file (which is for Linux/Mac).

    Also, I'd suggest installing Qt 5.2 beta ( ) -- it comes with Qt Windows Extras pre-built. (If you can wait a day or two, Qt 5.2 Release Candidate 1 will be out very soon)

  • I am not aware of where to find the zip file. All I could find was the gitorious site and clicking download provides a tar.gz. I was really hoping to find a corresponding stable release of winextras to go with 5.1.1. I will look around some more but can you tell me where I am supposed to get this from?

    After I find it, will the zip file have different contents. My experience is that all that changes is the line endings. I got around the above error by copying the file and more things failed. It isn't clear from your post that getting the zip will fix all my issues. Is there a pointer to building?

    Qt 5.2 will be interesting and I will take a look at it, but I will always be building the entire source so pre-built is not an option for me. For now, I am simply trying to get Qt buildling so that I can see how many issue we might have migrating from Qt 4.8.4 to 5.x.x. I would rather not start on a new version quite yet but can after I make a bit more progress

    Thanks for the reply

  • Moderators

    The Qt Windows Extras module has not been released before; it will be released with Qt 5.2.

    Since you're still in the middle of porting, I do recommend going to Qt 5.2 if you need Qt Windows Extras. It is fully backwards-compatible with Qt 5.1 and Qt 5.0. The zip file for the entire Qt library is at , individual modules are at .

    IIRC, the .zip package contains extra files (that aren't in the .tar.gz packages) that are required for building on Windows. However, your issue with shadow building sounds unrelated to this.

    I'd say your best chance of success is to start a fresh build of Qt, configured to include Qt Windows Extras from the outset. There's a guide at (just ignore git-related bits)

  • I went with your advice and cloned the v5.2.0-beta1 tag of the stable repo. Everything appears to have built fine. That should work fine for me. Thanks

  • Moderators

    Good to hear. All the best!

Log in to reply