Results 1 to 3 of 3

Thread: Qt 5.0.1 + Visual Studio 2012 + OpenGL Error

  1. #1
    Join Date
    Jan 2006
    Location
    Third rock from the sun
    Posts
    106
    Thanks
    17
    Thanked 6 Times in 6 Posts
    Qt products
    Qt4
    Platforms
    Unix/X11 Windows

    Question Qt 5.0.1 + Visual Studio 2012 + OpenGL Error

    I am trying to convert my Qt4 project to Qt5. It uses OpenGL and works fine on 2008/Qt4.8.4. Please note, that I am retyping in the errors listed and not copying pasting and full code is NOT available.

    - I have recompiled Qt 5.0.1 (sucessfully) using the "-opengl desktop" flag
    - Installed the Visual Studio 2012 Add-in

    When I compile my code I get the following error:

    1>C:\Program Files (x86)\Windows Kits\8.0\Include\um\GL/gl.h(60): error C2371: 'GLdouble' : redefinition; different basic types
    1> c:\qt\qt-everywhere-opensource-src-5.0.1\qtbase\include\qtgui\../../src/gui/opengl/qopengl.h(71) : see declaration of 'GLdouble'
    if I replace the
    Qt Code:
    1. #include <GL/gl.h>
    To copy to clipboard, switch view to plain text mode 
    with
    Qt Code:
    1. #include <qopengl.h>
    To copy to clipboard, switch view to plain text mode 
    or
    Qt Code:
    1. #include <qgl.h>
    To copy to clipboard, switch view to plain text mode 
    I get GL_PROJECTION macro not found errors and the redefinition errors are gone. I "should" not be using the OpenGL ES due to the -opengl desktop flag. Any help would be GREATLY appricated!

    [EDITED:] Also, this is using a QGLWidget and not QWindow.
    Last edited by Rayven; 19th April 2013 at 18:49. Reason: added addtional information
    Every little child knows
    if you cant see dreams
    your eyes are blind

    Moxy Fruvous

  2. #2
    Join Date
    Jan 2006
    Location
    Third rock from the sun
    Posts
    106
    Thanks
    17
    Thanked 6 Times in 6 Posts
    Qt products
    Qt4
    Platforms
    Unix/X11 Windows

    Default Re: Qt 5.0.1 + Visual Studio 2012 + OpenGL Error

    I am rebuilding 5.0.1 right now. When I built 5.0.1 I used -loadconfig, but it seems it did not take any of the flags, but built with defaults instead. I went back into the the configure output and ANGLE was still being used despite the -opengl desktop being passed in. I am rebuilding directly typing in the command flags. Also, it seems that 5.0.2 may have also fixed some of the OpenGL ES issues, so I will try and built with 5.0.2 as well.

    http://stackoverflow.com/questions/1...io-2012-opengl
    Every little child knows
    if you cant see dreams
    your eyes are blind

    Moxy Fruvous

  3. #3
    Join Date
    Jan 2006
    Location
    Third rock from the sun
    Posts
    106
    Thanks
    17
    Thanked 6 Times in 6 Posts
    Qt products
    Qt4
    Platforms
    Unix/X11 Windows

    Default [SOLVED] Qt 5.0.1 + Visual Studio 2012 + OpenGL Error

    In short: for Visual Studio 2012 is to use/build Qt 5.0.2 and disable angle (-no-angle) AND use -opengl desktop.
    Every little child knows
    if you cant see dreams
    your eyes are blind

    Moxy Fruvous

Similar Threads

  1. Help regarding QT plugins for Visual studio 2012
    By shah_27 in forum Qt Programming
    Replies: 0
    Last Post: 9th January 2013, 09:42
  2. Replies: 1
    Last Post: 3rd January 2013, 17:21
  3. Build qt 5 with Visual Studio 2012
    By Edder in forum Installation and Deployment
    Replies: 4
    Last Post: 28th December 2012, 10:16
  4. Qt 4.8.3 with Visual Studio 2012 does not compile the webkit
    By dennis81 in forum Installation and Deployment
    Replies: 1
    Last Post: 4th December 2012, 02:25
  5. link error for visual studio.net 2003
    By berlin in forum Newbie
    Replies: 9
    Last Post: 29th September 2006, 16:06

Tags for this Thread

Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  
Digia, Qt and their respective logos are trademarks of Digia Plc in Finland and/or other countries worldwide.