Error: LNK1104: File "glu32.lib" cannot be opened

  • I just installed Qt, tried to compile and link a fresh Qt Widgets project and I get this error message. Does anybody know a solution?


  • Lifetime Qt Champion

    Hi and welcome to devnet,

    What version of Qt did you install on which version of Windows ?

  • Hi got the same problem ! I use Qt 5.3 in windows 8.1 ! please help.

  • Lifetime Qt Champion

    Which Qt package did you install ?

  • sorry but I'm new to Qt I've installed Qt 5.3 ! how to find which current package is installed ?

  • Lifetime Qt Champion

    Which one did you download to install Qt 5 ?

  • I just ran into this same problem.
    I used all the defaults for the install the first time.
    When I got this, I thought I must have messed something up, so I uninstalled and reinstalled.
    I used this version from the site:


    The second time, I chose to add in the OpenGL for Visual Studio 2013 64bit and 32bit.

    My project still wont build.

    I'm running Windows 8.1 Pro 64bit on my Surface Pro 3.
    I have Visual Studio 2013 Pro installed, but didn't install the C++ Foundation stuff, unless that's the problem?

  • Just an additional clarification. I installed QT on my MacBook Pro, the Mac version went in fine and I made a HelloWorld project and it built and ran fine.
    I then went and ran Parallels to run my Windows 8.1 Pro VM. I went and downloaded the latest version from the QT site (same version in my previous post), and installed with all the default options, I didn't check anything. The following is the output from the installer telling me what I was installing:

    Selected Component(s) without Dependencies
    Added as dependency for qt.53.
    Component(s) that have resolved Dependencies
    Added as dependency for
    Added as dependency for qt.53.win32_msvc2012_opengl.
    Component(s) that have resolved Dependencies
    Added as dependency for qt.53.win64_msvc2013_64.
    Component(s) that have resolved Dependencies
    Added as dependency for qt.53.android_armv7.
    Component(s) that have resolved Dependencies

    After the installation, I created a new QT Widgets Application, went to immediately build and I got the link error. The only thing in common with my Surface Pro 3 and my Parallels VM is both have Visual Studio 2013 installed.

  • OK, After messing around with the various project settings when creating a new project, I think I figured out what's wrong... It seems that by default when making a new project during Kit Selection, the "Desktop Qt 5.3 MSVC2012 OpenGL 32bit" kit is selected. I don't have VS2012 installed on either of my WIndows setups.

    I uncheck it and leave the "Desktop QT5.3 MVSVC2013 64bit" checked (both were checked by default).

    Once the project is created, I build and it seems to work!

    The next newbie question is how to remove a kit from my previous projects.

  • Lifetime Qt Champion

    Hi and welcome to devnet,

    Go in the Project panel and remove the kit from there

  • Thanks, I figured it out once you told me where to go. I didn't realize that all the tabs on the top of the Project section were for the kits.

Log in to reply

Looks like your connection to Qt Forum was lost, please wait while we try to reconnect.