Nominate our 2022 Qt Champions!

How to create vc++ file from .pro file

  • Hello guys i have installed VS 2012 and Qt 5.1.1 and wrote a project also i just want to generate VC++ file via cmd with use of .pro file and qmake could anyone tell me how to do that so the code will run and identify all includes and classes of qt

  • Lifetime Qt Champion


    Once you have setup your pro file properly, IIRC it's

    @qmake -tp vc@

  • thanks SGaist it worked but when i run one code i am getting the following error "Cannot open include file: 'GL/gl.h': No such file or directory1> main.cpp"
    could you please help.

  • sorry and mentioned incorrect i have installed Qt 5.3.3 opengl Qt version for VS 2012

  • That means you need the opengl headers from the developer package of opengl. Or if you have installed that already you need to point your INCLUDEPATH in your pro file at the include directory for the opengl stuff.

    Or maybe you didn't even intend to use opengl in which case you can try excluding it with QT -= opengl.

  • Its not working when i double click on error its showing error in qpengl.h

    include <GL/gl.h>

  • Yea that is because you don't have the opengl headers installed on your system or if you do Qt can't find them.

    Do a forum search here for gl.h and you will find a lot of topics on this.

Log in to reply