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. Qt5 + VS2012 express + OpenGL + GLEW
Forum Updated to NodeBB v4.3 + New Features

Qt5 + VS2012 express + OpenGL + GLEW

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

    This code compiles fine in Qt 4.8 with Visual Studio Express 2012
    @
    #define GLEW_STATIC
    #define QT_NO_OPENGL_ES_2

    #include <GL/glew.h>
    #include <QApplication>
    #include <QGLWidget>

    int main(int argc, char** argv){
    glewInit();

    QApplication app(argc, argv);
    QGLWidget widget;
    
    GLuint arr;
    glGenVertexArrays(1, &arr); // added just for testing
    
    widget.show();
    return app.exec&#40;&#41;;
    

    }@

    After upgrading to Qt5 I am not able to make it compile anymore with any of the precompiled libraries available in the download web page.

    Qt5.1.1 VS2012 32 bits
    error C2371: 'GLsizeiptr' : redefinition; different basic types C:\Qt\Qt5.1.0\5.1.0\msvc2012\include\QtANGLE\GLES2\gl2.h
    error C2371: 'GLintptr' : redefinition; different basic types C:\Qt\Qt5.1.0\5.1.0\msvc2012\include\QtANGLE\GLES2\gl2.h
    error C2371: 'GLdouble' : redefinition; different basic types C:\Qt\Qt5.1.0\5.1.0\msvc2012\include\QtGui\qopengl.h
    error C2365: '__glewVertexAttribPointer' : redefinition; previous definition was 'data variable' C:\Qt\Qt5.1.0\5.1.0\msvc2012\include\QtANGLE\GLES2\gl2.h
    error C2365: '__glewVertexAttrib4fv' : redefinition; previous definition was 'data variable' C:\Qt\Qt5.1.0\5.1.0\msvc2012\include\QtANGLE\GLES2\gl2.h

    Qt 5.1.1 VS2010 32 bits + OpenGL
    error LNK2001: unresolved external symbol "__declspec(dllimport) public: virtual __thiscall QGLWidget::~QGLWidget(void)"
    error LNK2001: unresolved external symbol "__declspec(dllimport) public: __thiscall QGLWidget::QGLWidget(class QWidget *,class QGLWidget const *,class QFlags<enum Qt::WindowType>)"

    Qt5.1.1 VS2012 64 bits + OpenGL
    error LNK1112: module machine type 'x64' conflicts with target machine type 'X86'

    I also tried to compile Qt myself with no success; there are much more dependencies than previous versions making impossible for someone with limited experience.

    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