Skip to content
  • Categories
  • Recent
  • Tags
  • Popular
  • Users
  • Groups
  • Search
  • Get Qt Extensions
  • Unsolved
Collapse
Brand Logo
  1. Home
  2. General talk
  3. Qt 6
  4. OpenGL "make"-error 255
Forum Updated to NodeBB v4.3 + New Features

OpenGL "make"-error 255

Scheduled Pinned Locked Moved Solved Qt 6
10 Posts 4 Posters 1.6k Views 1 Watching
  • 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.
  • uaniU Offline
    uaniU Offline
    uani
    wrote on last edited by uani
    #1

    Re: Qt6 OpenGL Static Release. Error: qopenglpaintengine.cpp:-1: error: undefined reference to `__imp_glMatrixMode'

    ( @8Observer8 )

    the solution might be as given in https://stackoverflow.com/a/34701180/5588495 :

    use

    QOpenGLFunctions *f = QOpenGLContext::currentContext()->functions();
    
    f->glFunctionCall();    // FunctionCall being something like ClearColor
    

    (1)



    However I receive a "make"-error using

    • Qt 6.4.0 MingW 64-bit 11.2.0
    • Qt 5.15.2 MingW 32-bit 8.1.0

    on

    • Windows 11 (x64)

    for the project

    • https://github.com/florianblume/qt3d-widget

    with "shared" as well as "shared_and_static" set for CONFIG,

    namely :

    :-1: Fehler: [Makefile.Release:71: ../../qt3d-widget/lib/qt3dwidget2.dll] Error 255

    Note: for Qt 6.4.0 I had to replace opengl by openglwidgets for QT in the .pro file

    (2)



    Help appreciated for this issue as well as if there is an alternative for the aim of that GitHub project (layering QWidgets above a Qt3D window in a Qt Desktop application).

    (3)



    I am trying to build that project anew because in my Qt 6.4.0 64-bit MingW project where i want to use it i receive an error about the lib:

    :-1: Fehler: cannot find -l/libqt3dwidget.a
    :-1: Fehler: collect2.exe: error: ld returned 1 exit status

    although the library is present at the location

    LIBS += \
        lib/libqt3dwidget.a
    

    relative to my project file. I thought the cause might be it's a linux format or it's 32-bit.

    (4)

    Christian EhrlicherC uaniU 2 Replies Last reply
    0
    • uaniU uani

      Re: Qt6 OpenGL Static Release. Error: qopenglpaintengine.cpp:-1: error: undefined reference to `__imp_glMatrixMode'

      ( @8Observer8 )

      the solution might be as given in https://stackoverflow.com/a/34701180/5588495 :

      use

      QOpenGLFunctions *f = QOpenGLContext::currentContext()->functions();
      
      f->glFunctionCall();    // FunctionCall being something like ClearColor
      

      (1)



      However I receive a "make"-error using

      • Qt 6.4.0 MingW 64-bit 11.2.0
      • Qt 5.15.2 MingW 32-bit 8.1.0

      on

      • Windows 11 (x64)

      for the project

      • https://github.com/florianblume/qt3d-widget

      with "shared" as well as "shared_and_static" set for CONFIG,

      namely :

      :-1: Fehler: [Makefile.Release:71: ../../qt3d-widget/lib/qt3dwidget2.dll] Error 255

      Note: for Qt 6.4.0 I had to replace opengl by openglwidgets for QT in the .pro file

      (2)



      Help appreciated for this issue as well as if there is an alternative for the aim of that GitHub project (layering QWidgets above a Qt3D window in a Qt Desktop application).

      (3)



      I am trying to build that project anew because in my Qt 6.4.0 64-bit MingW project where i want to use it i receive an error about the lib:

      :-1: Fehler: cannot find -l/libqt3dwidget.a
      :-1: Fehler: collect2.exe: error: ld returned 1 exit status

      although the library is present at the location

      LIBS += \
          lib/libqt3dwidget.a
      

      relative to my project file. I thought the cause might be it's a linux format or it's 32-bit.

      (4)

      uaniU Offline
      uaniU Offline
      uani
      wrote on last edited by
      #9

      @uani said in OpenGL "make"-error 255:

      :-1: Fehler: [Makefile.Release:71: ../../qt3d-widget/lib/qt3dwidget2.dll] Error 255

      this is an error in the Makefile in the build folder QT creates and in particular in the file named Makefle.Release on line 71.

      That line corresponds to a line in the .pro file of the project. I figured out it does something wrong and worked around it.

      Now the project compiles.

      Thank you very much for everyone taking their time.

      G 1 Reply Last reply
      0
      • uaniU uani

        Re: Qt6 OpenGL Static Release. Error: qopenglpaintengine.cpp:-1: error: undefined reference to `__imp_glMatrixMode'

        ( @8Observer8 )

        the solution might be as given in https://stackoverflow.com/a/34701180/5588495 :

        use

        QOpenGLFunctions *f = QOpenGLContext::currentContext()->functions();
        
        f->glFunctionCall();    // FunctionCall being something like ClearColor
        

        (1)



        However I receive a "make"-error using

        • Qt 6.4.0 MingW 64-bit 11.2.0
        • Qt 5.15.2 MingW 32-bit 8.1.0

        on

        • Windows 11 (x64)

        for the project

        • https://github.com/florianblume/qt3d-widget

        with "shared" as well as "shared_and_static" set for CONFIG,

        namely :

        :-1: Fehler: [Makefile.Release:71: ../../qt3d-widget/lib/qt3dwidget2.dll] Error 255

        Note: for Qt 6.4.0 I had to replace opengl by openglwidgets for QT in the .pro file

        (2)



        Help appreciated for this issue as well as if there is an alternative for the aim of that GitHub project (layering QWidgets above a Qt3D window in a Qt Desktop application).

        (3)



        I am trying to build that project anew because in my Qt 6.4.0 64-bit MingW project where i want to use it i receive an error about the lib:

        :-1: Fehler: cannot find -l/libqt3dwidget.a
        :-1: Fehler: collect2.exe: error: ld returned 1 exit status

        although the library is present at the location

        LIBS += \
            lib/libqt3dwidget.a
        

        relative to my project file. I thought the cause might be it's a linux format or it's 32-bit.

        (4)

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

        @uani said in OpenGL "make"-error 255:

        LIBS +=
        lib/libqt3dwidget.a

        This is wrong

        LIBS += -Llib -lqt3dwidget

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

        uaniU 1 Reply Last reply
        1
        • Christian EhrlicherC Christian Ehrlicher

          @uani said in OpenGL "make"-error 255:

          LIBS +=
          lib/libqt3dwidget.a

          This is wrong

          LIBS += -Llib -lqt3dwidget

          uaniU Offline
          uaniU Offline
          uani
          wrote on last edited by
          #3

          @Christian-Ehrlicher said in OpenGL "make"-error 255:

          LIBS += -Llib -lqt3dwidget

          doesn't solve it, but i thank you. I also tried -Llib -llibqt3widget to no avail (can you point me to a doc about the rules?):

          9b71f23b-91bc-4b62-830c-30df80b4eeed-image.png

          1 Reply Last reply
          0
          • Christian EhrlicherC Offline
            Christian EhrlicherC Offline
            Christian Ehrlicher
            Lifetime Qt Champion
            wrote on last edited by
            #4

            Then pass the full path of the library and not the relativ 'lib'.

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

            1 Reply Last reply
            0
            • uaniU Offline
              uaniU Offline
              uani
              wrote on last edited by
              #5

              like
              f6c33761-f4a5-4642-93cc-a3bded2cf0d4-image.png
              ? (same error as expanding $PWD explicitly)

              because I now do not receive the "cannot find" error anymore but an "undefined reference" error but I use Qt3DWidget as documented. Is this perhaps an architecture (x86 vs x64 or linux? lib vs windows lib) issue? If yes i would be glad to still find out about a solution to the thread title error.

              JonBJ 1 Reply Last reply
              0
              • uaniU uani

                like
                f6c33761-f4a5-4642-93cc-a3bded2cf0d4-image.png
                ? (same error as expanding $PWD explicitly)

                because I now do not receive the "cannot find" error anymore but an "undefined reference" error but I use Qt3DWidget as documented. Is this perhaps an architecture (x86 vs x64 or linux? lib vs windows lib) issue? If yes i would be glad to still find out about a solution to the thread title error.

                JonBJ Offline
                JonBJ Offline
                JonB
                wrote on last edited by JonB
                #6

                @uani
                If this is to work at all (I don't know), if you pass the full path to the library archive file you do not want to use -L. It would be LIBS += "$PWD/libqt3widget.a", or whatever for the path.

                1 Reply Last reply
                0
                • uaniU Offline
                  uaniU Offline
                  uani
                  wrote on last edited by
                  #7

                  thank you @JonB

                  unfortunately that format, which likely is most correct regarding substitution and path like below, produces the same error like in the screenshot above

                  LIBS += "$${PWD}/lib/libqt3dwidget.a"
                  
                  1 Reply Last reply
                  0
                  • uaniU Offline
                    uaniU Offline
                    uani
                    wrote on last edited by
                    #8

                    I infer from https://forum.qt.io/topic/46613/solved-undefined-reference-to-qwidget-stylechange/3 the app must be build using the same version of Qt like used to build the library which is not the case here why i wanted to build the library using the same version like I want to use to build my app but which stops at the error in the thread title.

                    1 Reply Last reply
                    0
                    • uaniU uani

                      Re: Qt6 OpenGL Static Release. Error: qopenglpaintengine.cpp:-1: error: undefined reference to `__imp_glMatrixMode'

                      ( @8Observer8 )

                      the solution might be as given in https://stackoverflow.com/a/34701180/5588495 :

                      use

                      QOpenGLFunctions *f = QOpenGLContext::currentContext()->functions();
                      
                      f->glFunctionCall();    // FunctionCall being something like ClearColor
                      

                      (1)



                      However I receive a "make"-error using

                      • Qt 6.4.0 MingW 64-bit 11.2.0
                      • Qt 5.15.2 MingW 32-bit 8.1.0

                      on

                      • Windows 11 (x64)

                      for the project

                      • https://github.com/florianblume/qt3d-widget

                      with "shared" as well as "shared_and_static" set for CONFIG,

                      namely :

                      :-1: Fehler: [Makefile.Release:71: ../../qt3d-widget/lib/qt3dwidget2.dll] Error 255

                      Note: for Qt 6.4.0 I had to replace opengl by openglwidgets for QT in the .pro file

                      (2)



                      Help appreciated for this issue as well as if there is an alternative for the aim of that GitHub project (layering QWidgets above a Qt3D window in a Qt Desktop application).

                      (3)



                      I am trying to build that project anew because in my Qt 6.4.0 64-bit MingW project where i want to use it i receive an error about the lib:

                      :-1: Fehler: cannot find -l/libqt3dwidget.a
                      :-1: Fehler: collect2.exe: error: ld returned 1 exit status

                      although the library is present at the location

                      LIBS += \
                          lib/libqt3dwidget.a
                      

                      relative to my project file. I thought the cause might be it's a linux format or it's 32-bit.

                      (4)

                      uaniU Offline
                      uaniU Offline
                      uani
                      wrote on last edited by
                      #9

                      @uani said in OpenGL "make"-error 255:

                      :-1: Fehler: [Makefile.Release:71: ../../qt3d-widget/lib/qt3dwidget2.dll] Error 255

                      this is an error in the Makefile in the build folder QT creates and in particular in the file named Makefle.Release on line 71.

                      That line corresponds to a line in the .pro file of the project. I figured out it does something wrong and worked around it.

                      Now the project compiles.

                      Thank you very much for everyone taking their time.

                      G 1 Reply Last reply
                      0
                      • uaniU uani

                        @uani said in OpenGL "make"-error 255:

                        :-1: Fehler: [Makefile.Release:71: ../../qt3d-widget/lib/qt3dwidget2.dll] Error 255

                        this is an error in the Makefile in the build folder QT creates and in particular in the file named Makefle.Release on line 71.

                        That line corresponds to a line in the .pro file of the project. I figured out it does something wrong and worked around it.

                        Now the project compiles.

                        Thank you very much for everyone taking their time.

                        G Offline
                        G Offline
                        Grigg_23
                        wrote on last edited by
                        #10
                        This post is deleted!
                        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