PDA

View Full Version : <qopengl.h> library .lib?



giugio
9th September 2013, 19:44
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:


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>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)
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)
2>main.obj : error LNK2019: unresolved external symbol glCreateProgram referenced in function "public: __cdecl OPEN::CShader::CShader(void)" (??0CShader@OPEN@@QEAA@XZ)
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)
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)
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)
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)
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)
2>C:\Open2\Open2\x64\Debug\\qtgltest.exe : fatal error LNK1120: 9 unresolved externals
========== Build: 1 succeeded, 1 failed, 2 up-to-date, 0 skipped ==========



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

giugio
10th September 2013, 09:12
i use 64 bit libraries , may be the problem ?
where i can find an opengl32 for the 64 bit?
thanks.

wysota
10th September 2013, 09:17
Which version of Qt are you using?

giugio
10th September 2013, 10:11
version 5.1

wysota
10th September 2013, 10:20
Have a look at QOpenGLFunctions class.

giugio
10th September 2013, 10:52
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.