Skip to content
  • Categories
  • Recent
  • Tags
  • Popular
  • Users
  • Groups
  • Search
  • Get Qt Extensions
  • Unsolved
Collapse
Brand Logo
  1. Home
  2. Qt Development
  3. Installation and Deployment
  4. QT 5.0.1 opengl compilation error

QT 5.0.1 opengl compilation error

Scheduled Pinned Locked Moved Installation and Deployment
2 Posts 2 Posters 2.3k 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.
  • E Offline
    E Offline
    Enstone
    wrote on last edited by
    #1

    Hi,

    I try to re compile QT 5.0.1 with -static option. I am using windows 7 x64, have python, perl in my path, sdk directx installed.
    I took the src from the QT git. After 2 hours of compilation, I have this error:
    @
    g++ -Wl,-s -Wl,-subsystem,console -o C:\Qt\Qt5.0.1\5.0.1\qt5v2\qtbase\bin\qmlsce
    ne.exe .obj/release_static/main.o .obj/release_static/qmlscene_plugin_import.o
    -LC:/Qt/Qt5.0.1/5.0.1/qt5v2/qtbase/lib -lopengl32 -lQt5Quick -lQt5Qml -lQt5V8 -l
    Qt5Widgets -lQt5Network -ldnsapi -LC:/Qt/Qt5.0.1/5.0.1/qt5v2/qtbase/plugins/plat
    forms -lqwindows -lwinspool -lshlwapi -lQt5PlatformSupport -lQt5Gui -lQt5Core -l
    z -llibEGL -ldxguid -llibGLESv2 -lshell32 -lkernel32 -lcomdlg32 -loleaut32 -limm
    32 -lwinmm -lws2_32 -lole32 -luuid -ladvapi32 -ld3d9 -ld3dcompiler C:/Qt/Qt5.0.1
    /5.0.1/qt5v2/qtbase/lib/libtranslator_common.a C:/Qt/Qt5.0.1/5.0.1/qt5v2/qtbase/
    lib/libtranslator_hlsl.a C:/Qt/Qt5.0.1/5.0.1/qt5v2/qtbase/lib/libpreprocessor.a
    -lgdi32 -luser32
    C:/Qt/Qt5.0.1/5.0.1/qt5v2/qtbase/lib/libQt5Quick.a(qsgtexture.o):qsgtexture.cpp:
    (.text+0x243): undefined reference to _imp__glTexParameteri@12' C:/Qt/Qt5.0.1/5.0.1/qt5v2/qtbase/lib/libQt5Quick.a(qsgtexture.o):qsgtexture.cpp: (.text+0x306): undefined reference to _imp__glTexParameteri@12'
    C:/Qt/Qt5.0.1/5.0.1/qt5v2/qtbase/lib/libQt5Quick.a(qsgtexture.o):qsgtexture.cpp:
    (.text+0x3f0): undefined reference to _imp__glDeleteTextures@8' C:/Qt/Qt5.0.1/5.0.1/qt5v2/qtbase/lib/libQt5Quick.a(qsgtexture.o):qsgtexture.cpp: (.text+0x54b): undefined reference to _imp__glGenTextures@8'
    C:/Qt/Qt5.0.1/5.0.1/qt5v2/qtbase/lib/libQt5Quick.a(qsgtexture.o):qsgtexture.cpp:
    (.text+0x5c0): undefined reference to _imp__glDeleteTextures@8' C:/Qt/Qt5.0.1/5.0.1/qt5v2/qtbase/lib/libQt5Quick.a(qsgtexture.o):qsgtexture.cpp: (.text+0x61d): undefined reference to _imp__glBindTexture@8'
    C:/Qt/Qt5.0.1/5.0.1/qt5v2/qtbase/lib/libQt5Quick.a(qsgtexture.o):qsgtexture.cpp:
    (.text+0x6bd): undefined reference to _imp__glBindTexture@8' C:/Qt/Qt5.0.1/5.0.1/qt5v2/qtbase/lib/libQt5Quick.a(qsgtexture.o):qsgtexture.cpp: (.text+0x780): undefined reference to _imp__glTexImage2D@36'
    C:/Qt/Qt5.0.1/5.0.1/qt5v2/qtbase/lib/libQt5Quick.a(qsgtexture.o):qsgtexture.cpp:
    (.text+0x7a4): undefined reference to _imp__glGenerateMipmap@4' C:/Qt/Qt5.0.1/5.0.1/qt5v2/qtbase/lib/libQt5Quick.a(qsgtexture.o):qsgtexture.cpp: (.text+0x7f1): undefined reference to _imp__glGenTextures@8'
    C:/Qt/Qt5.0.1/5.0.1/qt5v2/qtbase/lib/libQt5Quick.a(qsgtexture.o):qsgtexture.cpp:
    (.text+0x827): undefined reference to _imp__glGenerateMipmap@4' C:/Qt/Qt5.0.1/5.0.1/qt5v2/qtbase/lib/libQt5Quick.a(qsgtexture.o):qsgtexture.cpp: (.text+0x850): undefined reference to imp__glDeleteTextures@8'
    c:/qt/qt5.0.1/tools/mingw/bin/../lib/gcc/i686-w64-mingw32/4.7.2/../../../../i686
    -w64-mingw32/bin/ld.exe: C:/Qt/Qt5.0.1/5.0.1/qt5v2/qtbase/lib/libQt5Quick.a(qsgt
    exture.o): bad reloc address 0x2 in section `.text$ZN17QSGTexturePrivateD1Ev[

    ZN17QSGTexturePrivateD1Ev]'
    collect2.exe: error: ld returned 1 exit status@

    It seems to be an opengl issue, because when I try to add -lopengl32 like this, some errors disappear.

    @
    g++ -Wl,-s -Wl,-subsystem,console -o C:\Qt\Qt5.0.1\5.0.1\qt5v2\qtbase\bin\qmlsce
    ne.exe .obj/release_static/main.o .obj/release_static/qmlscene_plugin_import.o
    -LC:/Qt/Qt5.0.1/5.0.1/qt5v2/qtbase/lib -lQt5Quick -lQt5Qml -lQt5V8 -lQt5Widgets
    -lQt5Network -ldnsapi -LC:/Qt/Qt5.0.1/5.0.1/qt5v2/qtbase/plugins/platforms -lqwi
    ndows -lwinspool -lshlwapi -lQt5PlatformSupport -lQt5Gui -lQt5Core -lz -llibEGL
    -ldxguid -llibGLESv2 -lshell32 -lkernel32 -lcomdlg32 -loleaut32 -limm32 -lwinmm
    -lws2_32 -lole32 -luuid -ladvapi32 -ld3d9 -ld3dcompiler C:/Qt/Qt5.0.1/5.0.1/qt5v
    2/qtbase/lib/libtranslator_common.a C:/Qt/Qt5.0.1/5.0.1/qt5v2/qtbase/lib/libtran
    slator_hlsl.a C:/Qt/Qt5.0.1/5.0.1/qt5v2/qtbase/lib/libpreprocessor.a -lgdi32 -lu
    ser32 -lopengl32
    C:/Qt/Qt5.0.1/5.0.1/qt5v2/qtbase/lib/libQt5Quick.a(qsgtexture.o):qsgtexture.cpp:
    (.text+0x7a4): undefined reference to _imp__glGenerateMipmap@4' C:/Qt/Qt5.0.1/5.0.1/qt5v2/qtbase/lib/libQt5Quick.a(qsgtexture.o):qsgtexture.cpp: (.text+0x827): undefined reference to imp__glGenerateMipmap@4'
    c:/qt/qt5.0.1/tools/mingw/bin/../lib/gcc/i686-w64-mingw32/4.7.2/../../../../i686
    -w64-mingw32/bin/ld.exe: C:/Qt/Qt5.0.1/5.0.1/qt5v2/qtbase/lib/libQt5Quick.a(qsgt
    exture.o): bad reloc address 0x2 in section `.text$ZN17QSGTexturePrivateD1Ev[

    ZN17QSGTexturePrivateD1Ev]'
    collect2.exe: error: ld returned 1 exit status @

    But now, i don't know what to do next.

    I need some help. Thanks

    1 Reply Last reply
    0
    • W Offline
      W Offline
      wakeuky
      wrote on last edited by
      #2

      Do you require openGL? I have noticed that the same occurs for me when I try to build Qt on my Mac. I always have to configure with -no-opengl, or no dice :(

      Don't Panic

      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