Skip to content
  • Categories
  • Recent
  • Tags
  • Popular
  • Users
  • Groups
  • Search
  • Get Qt Extensions
  • Unsolved
Collapse
Brand Logo
  1. Home
  2. Qt Development
  3. General and Desktop
  4. Unable to build on windows 11 & Qt 5.12 because of linker error
Qt 6.11 is out! See what's new in the release blog

Unable to build on windows 11 & Qt 5.12 because of linker error

Scheduled Pinned Locked Moved Unsolved General and Desktop
3 Posts 3 Posters 639 Views
  • Oldest to Newest
  • Newest to Oldest
  • Most Votes
Reply
  • Reply as topic
Log in to reply
This topic has been deleted. Only users with topic management privileges can see it.
  • E Offline
    E Offline
    eswarm
    wrote on last edited by
    #1

    Hello,

    I am trying to build https://github.com/QUItCoding/qnanopainter which seems to use the following in the pri file

    win32 {
        equals(QT_MAJOR_VERSION, 5):lessThan(QT_MINOR_VERSION, 14) {
            CONFIG += windows_with_gles
            QT_CONFIG += opengles2 angle
    
            CONFIG( debug, debug|release ) {
                 debug
                LIBS+= -llibGLESv2d
            } else {
                 release
                LIBS+= -llibGLESV2
            }
        }
    }
    

    When I try to build it, it is giving me an error

    :-1: error: LNK1104: cannot open file 'libGLESv2d.lib'
    

    I see that this lib is present in the Qt folder itself, however trying to include in lib path or system path seems to have no effect.

    Environment :
    Qt 5.12.12 MSVC2017 64bit
    Windows 11

    Any hints or suggestions would be greatly appreciated.

    Thanks.

    Christian EhrlicherC 1 Reply Last reply
    0
    • E eswarm

      Hello,

      I am trying to build https://github.com/QUItCoding/qnanopainter which seems to use the following in the pri file

      win32 {
          equals(QT_MAJOR_VERSION, 5):lessThan(QT_MINOR_VERSION, 14) {
              CONFIG += windows_with_gles
              QT_CONFIG += opengles2 angle
      
              CONFIG( debug, debug|release ) {
                   debug
                  LIBS+= -llibGLESv2d
              } else {
                   release
                  LIBS+= -llibGLESV2
              }
          }
      }
      

      When I try to build it, it is giving me an error

      :-1: error: LNK1104: cannot open file 'libGLESv2d.lib'
      

      I see that this lib is present in the Qt folder itself, however trying to include in lib path or system path seems to have no effect.

      Environment :
      Qt 5.12.12 MSVC2017 64bit
      Windows 11

      Any hints or suggestions would be greatly appreciated.

      Thanks.

      Christian EhrlicherC Online
      Christian EhrlicherC Online
      Christian Ehrlicher
      Lifetime Qt Champion
      wrote on last edited by
      #2

      I doubt there is a libGLESv2d.lib in the qt's lib or bin folder and I don't know why you should link against it. Remove it from the pro file.

      Qt Online Installer direct download: https://download.qt.io/official_releases/online_installers/
      Visit the Qt Academy at https://academy.qt.io/catalog

      C 1 Reply Last reply
      0
      • Christian EhrlicherC Christian Ehrlicher

        I doubt there is a libGLESv2d.lib in the qt's lib or bin folder and I don't know why you should link against it. Remove it from the pro file.

        C Offline
        C Offline
        ChrisW67
        wrote on last edited by
        #3

        @Christian-Ehrlicher This is the file referred to by the OP. The PRI file is used when building the examples only; the main library uses CMake.

        The comment that the OP omitted reads:

        # Note: Due to Angle, windows might use either OpenGL (desktop) or
        #       OpenGL ES (angle) backend. Newer Qt versions don't automatically
        #       link with OpenGL ES libraries.
        win32 {
            equals(QT_MAJOR_VERSION, 5):lessThan(QT_MINOR_VERSION, 14) {
        ...
        

        This might provide a reason for explicitly linking the library. Like you I imagine this needs to be provided separately. It also strikes me that the comment and the PRO file logic are opposite in regard to the Qt versions i.e., it explicitly links for older version not newer versions.

        1 Reply Last reply
        0

        • Login

        • Login or register to search.
        • First post
          Last post
        0
        • Categories
        • Recent
        • Tags
        • Popular
        • Users
        • Groups
        • Search
        • Get Qt Extensions
        • Unsolved