Results 1 to 6 of 6

Thread: <qopengl.h> library .lib?

  1. #1
    Join Date
    Nov 2012
    Posts
    38
    Thanks
    3

    Default <qopengl.h> library .lib?

    hello , i use <qopengl.h> header for my experiments in opengl and qt.
    The problem is that i create a small library with templates, all the files are .hpp .
    When i must test the project i must import all the needed .hpp files in the test project, but i don't have a library(.lib) for the called gl primitives function like bindBuffer createbuffer ecc , and this is the result:
    Qt Code:
    1. 2>main.obj : error LNK2019: unresolved external symbol glBindBuffer referenced in function "public: void __cdecl OPEN::CShaderParItemVbo<struct glm::detail::tvec3<float> >::Create(unsigned int)" (?Create@?$CShaderParItemVbo@U?$tvec3@M@detail@glm@@@OPEN@@QEAAXI@Z)
    2. 2>main.obj : error LNK2019: unresolved external symbol glGenBuffers referenced in function "public: void __cdecl OPEN::CShaderParItemVbo<struct glm::detail::tvec3<float> >::Create(unsigned int)" (?Create@?$CShaderParItemVbo@U?$tvec3@M@detail@glm@@@OPEN@@QEAAXI@Z)
    3. 2>main.obj : error LNK2019: unresolved external symbol glBufferData referenced in function "public: void __cdecl OPEN::CShaderParItemVbo<struct glm::detail::tvec3<float> >::Create(unsigned int)" (?Create@?$CShaderParItemVbo@U?$tvec3@M@detail@glm@@@OPEN@@QEAAXI@Z)
    4. 2>main.obj : error LNK2019: unresolved external symbol glCreateProgram referenced in function "public: __cdecl OPEN::CShader::CShader(void)" (??0CShader@OPEN@@QEAA@XZ)
    5. 2>main.obj : error LNK2019: unresolved external symbol glEnableVertexAttribArray referenced in function "public: void __cdecl OPEN::CShaderParItemVbo<struct glm::detail::tvec3<float> >::Create(unsigned int)" (?Create@?$CShaderParItemVbo@U?$tvec3@M@detail@glm@@@OPEN@@QEAAXI@Z)
    6. 2>main.obj : error LNK2019: unresolved external symbol glGetAttribLocation referenced in function "public: void __cdecl OPEN::CShaderParItemVbo<struct glm::detail::tvec3<float> >::Create(unsigned int)" (?Create@?$CShaderParItemVbo@U?$tvec3@M@detail@glm@@@OPEN@@QEAAXI@Z)
    7. 2>main.obj : error LNK2019: unresolved external symbol glVertexAttribPointer referenced in function "public: void __cdecl OPEN::CShaderParItemVbo<struct glm::detail::tvec3<float> >::Create(unsigned int)" (?Create@?$CShaderParItemVbo@U?$tvec3@M@detail@glm@@@OPEN@@QEAAXI@Z)
    8. 2>main.obj : error LNK2019: unresolved external symbol glBindVertexArray referenced in function "public: unsigned int __cdecl OPEN::CEffect::internals::CreateVba(unsigned int)" (?CreateVba@internals@CEffect@OPEN@@QEAAII@Z)
    9. 2>main.obj : error LNK2019: unresolved external symbol glGenVertexArrays referenced in function "public: unsigned int __cdecl OPEN::CEffect::internals::CreateVba(unsigned int)" (?CreateVba@internals@CEffect@OPEN@@QEAAII@Z)
    10. 2>C:\Open2\Open2\x64\Debug\\qtgltest.exe : fatal error LNK1120: 9 unresolved externals
    11. ========== Build: 1 succeeded, 1 failed, 2 up-to-date, 0 skipped ==========
    To copy to clipboard, switch view to plain text mode 

    What library i must import for the <qopengl.h> header with qt?
    thanks.

  2. #2
    Join Date
    Nov 2012
    Posts
    38
    Thanks
    3

    Default Re: <qopengl.h> library .lib?

    i use 64 bit libraries , may be the problem ?
    where i can find an opengl32 for the 64 bit?
    thanks.

  3. #3
    Join Date
    Jan 2006
    Location
    Warsaw, Poland
    Posts
    33,359
    Thanks
    3
    Thanked 5,015 Times in 4,792 Posts
    Qt products
    Qt3 Qt4 Qt5 Qt/Embedded
    Platforms
    Unix/X11 Windows Android Maemo/MeeGo
    Wiki edits
    10

    Default Re: <qopengl.h> library .lib?

    Which version of Qt are you using?
    Your biological and technological distinctiveness will be added to our own. Resistance is futile.

    Please ask Qt related questions on the forum and not using private messages or visitor messages.


  4. #4
    Join Date
    Nov 2012
    Posts
    38
    Thanks
    3

    Default Re: <qopengl.h> library .lib?

    version 5.1

  5. #5
    Join Date
    Jan 2006
    Location
    Warsaw, Poland
    Posts
    33,359
    Thanks
    3
    Thanked 5,015 Times in 4,792 Posts
    Qt products
    Qt3 Qt4 Qt5 Qt/Embedded
    Platforms
    Unix/X11 Windows Android Maemo/MeeGo
    Wiki edits
    10

    Default Re: <qopengl.h> library .lib?

    Have a look at QOpenGLFunctions class.
    Your biological and technological distinctiveness will be added to our own. Resistance is futile.

    Please ask Qt related questions on the forum and not using private messages or visitor messages.


  6. #6
    Join Date
    Nov 2012
    Posts
    38
    Thanks
    3

    Default Re: <qopengl.h> library .lib?

    thanks it works.
    but this function is not supported :
    glGenVertexArrays

    is not possible to use the standard gl functions?
    Why there is this problem in qt with the libs?
    ps. i use the compilation at 64 bits.
    thanks.

Similar Threads

  1. QOpenGL in threads
    By wydesenej in forum Qt Programming
    Replies: 4
    Last Post: 22nd May 2013, 16:11
  2. Example Q, FLTKt and OpenGL without using QOpenGL
    By giorgik in forum Qt Programming
    Replies: 8
    Last Post: 27th December 2012, 19:56
  3. Replies: 3
    Last Post: 20th December 2012, 13:48
  4. Dynamic library on Mac, Library not loaded
    By grayfox in forum Newbie
    Replies: 2
    Last Post: 2nd July 2011, 03:42
  5. Replies: 2
    Last Post: 19th February 2011, 12:26

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.