Trolltech Home | Qt-interest Home | Recent Threads | All Threads | Author | Date
All threads index page 5

Qt-interest Archive, October 2007
OpenGL error


Message 1 in thread

Hi,

I tried to build one small OpenGL application in our build system and got 
following errors.

Can anybody please help with this?

Thanks
Manjeet Dahiya

Tetrahedron.obj : error LNK2019: unresolved external symbol 
__imp__glEnable@4 referenced in function "protected: virtual void __th
iscall Tetrahedron::initializeGL(void)" (?initializeGL@Tetrahedron@@MAEXXZ)
Tetrahedron.obj : error LNK2019: unresolved external symbol 
__imp__glShadeModel@4 referenced in function "protected: virtual void
__thiscall Tetrahedron::initializeGL(void)" 
(?initializeGL@Tetrahedron@@MAEXXZ)
Tetrahedron.obj : error LNK2019: unresolved external symbol __imp__glEnd@0 
referenced in function "private: void __thiscall Tetrah
edron::draw(void)" (?draw@Tetrahedron@@AAEXXZ)
Tetrahedron.obj : error LNK2019: unresolved external symbol 
__imp__glVertex3f@12 referenced in function "private: void __thiscall
Tetrahedron::draw(void)" (?draw@Tetrahedron@@AAEXXZ)
Tetrahedron.obj : error LNK2019: unresolved external symbol __imp__glBegin@4 
referenced in function "private: void __thiscall Tetr
ahedron::draw(void)" (?draw@Tetrahedron@@AAEXXZ)
Tetrahedron.obj : error LNK2019: unresolved external symbol 
__imp__glLoadName@4 referenced in function "private: void __thiscall T
etrahedron::draw(void)" (?draw@Tetrahedron@@AAEXXZ)
Tetrahedron.obj : error LNK2019: unresolved external symbol 
__imp__glRotatef@16 referenced in function "private: void __thiscall T
etrahedron::draw(void)" (?draw@Tetrahedron@@AAEXXZ)
Tetrahedron.obj : error LNK2019: unresolved external symbol 
__imp__glTranslatef@12 referenced in function "private: void __thiscal
l Tetrahedron::draw(void)" (?draw@Tetrahedron@@AAEXXZ)
Tetrahedron.obj : error LNK2019: unresolved external symbol 
__imp__glLoadIdentity@0 referenced in function "private: void __thisca
ll Tetrahedron::draw(void)" (?draw@Tetrahedron@@AAEXXZ)
Tetrahedron.obj : error LNK2019: unresolved external symbol 
__imp__glMatrixMode@4 referenced in function "private: void __thiscall
 Tetrahedron::draw(void)" (?draw@Tetrahedron@@AAEXXZ)
Tetrahedron.obj : error LNK2019: unresolved external symbol 
__imp__glPopMatrix@0 referenced in function "private: int __thiscall T
etrahedron::faceAtPosition(class QPoint const &)" 
(?faceAtPosition@Tetrahedron@@AAEHABVQPoint@@@Z)
Tetrahedron.obj : error LNK2019: unresolved external symbol 
__imp__glFrustum@48 referenced in function "private: int __thiscall Te
trahedron::faceAtPosition(class QPoint const &)" 
(?faceAtPosition@Tetrahedron@@AAEHABVQPoint@@@Z)
Tetrahedron.obj : error LNK2019: unresolved external symbol 
_gluPickMatrix@36 referenced in function "private: int __thiscall Tetr
ahedron::faceAtPosition(class QPoint const &)" 
(?faceAtPosition@Tetrahedron@@AAEHABVQPoint@@@Z)
Tetrahedron.obj : error LNK2019: unresolved external symbol 
__imp__glPushMatrix@0 referenced in function "private: int __thiscall
Tetrahedron::faceAtPosition(class QPoint const &)" 
(?faceAtPosition@Tetrahedron@@AAEHABVQPoint@@@Z)
Tetrahedron.obj : error LNK2019: unresolved external symbol 
__imp__glPushName@4 referenced in function "private: int __thiscall Te
trahedron::faceAtPosition(class QPoint const &)" 
(?faceAtPosition@Tetrahedron@@AAEHABVQPoint@@@Z)
Tetrahedron.obj : error LNK2019: unresolved external symbol 
__imp__glInitNames@0 referenced in function "private: int __thiscall T
etrahedron::faceAtPosition(class QPoint const &)" 
(?faceAtPosition@Tetrahedron@@AAEHABVQPoint@@@Z)
Tetrahedron.obj : error LNK2019: unresolved external symbol 
__imp__glRenderMode@4 referenced in function "private: int __thiscall
Tetrahedron::faceAtPosition(class QPoint const &)" 
(?faceAtPosition@Tetrahedron@@AAEHABVQPoint@@@Z)
Tetrahedron.obj : error LNK2019: unresolved external symbol 
__imp__glSelectBuffer@8 referenced in function "private: int __thiscal
l Tetrahedron::faceAtPosition(class QPoint const &)" 
(?faceAtPosition@Tetrahedron@@AAEHABVQPoint@@@Z)
Tetrahedron.obj : error LNK2019: unresolved external symbol 
__imp__glGetIntegerv@8 referenced in function "private: int __thiscall
 Tetrahedron::faceAtPosition(class QPoint const &)" 
(?faceAtPosition@Tetrahedron@@AAEHABVQPoint@@@Z)
Tetrahedron.obj : error LNK2019: unresolved external symbol __imp__glClear@4 
referenced in function "protected: virtual void __thi
scall Tetrahedron::paintGL(void)" (?paintGL@Tetrahedron@@MAEXXZ) 


--
 [ signature omitted ] 

Message 2 in thread

Have you activated QtOpenGL module at your qmake .pro file?

Try this:

---- CUT HERE ----
QT += opengl
---- CUT HERE ----

2007/10/22, Manjeet Dahiya <manjeetdahiya@xxxxxxxxx>:
> Hi,
>
> I tried to build one small OpenGL application in our build system and got
> following errors.
>
> Can anybody please help with this?
>
> Thanks
> Manjeet Dahiya
>
> Tetrahedron.obj : error LNK2019: unresolved external symbol
> __imp__glEnable@4 referenced in function "protected: virtual void __th
> iscall Tetrahedron::initializeGL(void)" (?initializeGL@Tetrahedron@@MAEXXZ)
> Tetrahedron.obj : error LNK2019: unresolved external symbol
> __imp__glShadeModel@4 referenced in function "protected: virtual void
> __thiscall Tetrahedron::initializeGL(void)"
> (?initializeGL@Tetrahedron@@MAEXXZ)
> Tetrahedron.obj : error LNK2019: unresolved external symbol __imp__glEnd@0
> referenced in function "private: void __thiscall Tetrah
> edron::draw(void)" (?draw@Tetrahedron@@AAEXXZ)
> Tetrahedron.obj : error LNK2019: unresolved external symbol
> __imp__glVertex3f@12 referenced in function "private: void __thiscall
> Tetrahedron::draw(void)" (?draw@Tetrahedron@@AAEXXZ)
> Tetrahedron.obj : error LNK2019: unresolved external symbol __imp__glBegin@4
> referenced in function "private: void __thiscall Tetr
> ahedron::draw(void)" (?draw@Tetrahedron@@AAEXXZ)
> Tetrahedron.obj : error LNK2019: unresolved external symbol
> __imp__glLoadName@4 referenced in function "private: void __thiscall T
> etrahedron::draw(void)" (?draw@Tetrahedron@@AAEXXZ)
> Tetrahedron.obj : error LNK2019: unresolved external symbol
> __imp__glRotatef@16 referenced in function "private: void __thiscall T
> etrahedron::draw(void)" (?draw@Tetrahedron@@AAEXXZ)
> Tetrahedron.obj : error LNK2019: unresolved external symbol
> __imp__glTranslatef@12 referenced in function "private: void __thiscal
> l Tetrahedron::draw(void)" (?draw@Tetrahedron@@AAEXXZ)
> Tetrahedron.obj : error LNK2019: unresolved external symbol
> __imp__glLoadIdentity@0 referenced in function "private: void __thisca
> ll Tetrahedron::draw(void)" (?draw@Tetrahedron@@AAEXXZ)
> Tetrahedron.obj : error LNK2019: unresolved external symbol
> __imp__glMatrixMode@4 referenced in function "private: void __thiscall
>  Tetrahedron::draw(void)" (?draw@Tetrahedron@@AAEXXZ)
> Tetrahedron.obj : error LNK2019: unresolved external symbol
> __imp__glPopMatrix@0 referenced in function "private: int __thiscall T
> etrahedron::faceAtPosition(class QPoint const &)"
> (?faceAtPosition@Tetrahedron@@AAEHABVQPoint@@@Z)
> Tetrahedron.obj : error LNK2019: unresolved external symbol
> __imp__glFrustum@48 referenced in function "private: int __thiscall Te
> trahedron::faceAtPosition(class QPoint const &)"
> (?faceAtPosition@Tetrahedron@@AAEHABVQPoint@@@Z)
> Tetrahedron.obj : error LNK2019: unresolved external symbol
> _gluPickMatrix@36 referenced in function "private: int __thiscall Tetr
> ahedron::faceAtPosition(class QPoint const &)"
> (?faceAtPosition@Tetrahedron@@AAEHABVQPoint@@@Z)
> Tetrahedron.obj : error LNK2019: unresolved external symbol
> __imp__glPushMatrix@0 referenced in function "private: int __thiscall
> Tetrahedron::faceAtPosition(class QPoint const &)"
> (?faceAtPosition@Tetrahedron@@AAEHABVQPoint@@@Z)
> Tetrahedron.obj : error LNK2019: unresolved external symbol
> __imp__glPushName@4 referenced in function "private: int __thiscall Te
> trahedron::faceAtPosition(class QPoint const &)"
> (?faceAtPosition@Tetrahedron@@AAEHABVQPoint@@@Z)
> Tetrahedron.obj : error LNK2019: unresolved external symbol
> __imp__glInitNames@0 referenced in function "private: int __thiscall T
> etrahedron::faceAtPosition(class QPoint const &)"
> (?faceAtPosition@Tetrahedron@@AAEHABVQPoint@@@Z)
> Tetrahedron.obj : error LNK2019: unresolved external symbol
> __imp__glRenderMode@4 referenced in function "private: int __thiscall
> Tetrahedron::faceAtPosition(class QPoint const &)"
> (?faceAtPosition@Tetrahedron@@AAEHABVQPoint@@@Z)
> Tetrahedron.obj : error LNK2019: unresolved external symbol
> __imp__glSelectBuffer@8 referenced in function "private: int __thiscal
> l Tetrahedron::faceAtPosition(class QPoint const &)"
> (?faceAtPosition@Tetrahedron@@AAEHABVQPoint@@@Z)
> Tetrahedron.obj : error LNK2019: unresolved external symbol
> __imp__glGetIntegerv@8 referenced in function "private: int __thiscall
>  Tetrahedron::faceAtPosition(class QPoint const &)"
> (?faceAtPosition@Tetrahedron@@AAEHABVQPoint@@@Z)
> Tetrahedron.obj : error LNK2019: unresolved external symbol __imp__glClear@4
> referenced in function "protected: virtual void __thi
> scall Tetrahedron::paintGL(void)" (?paintGL@Tetrahedron@@MAEXXZ)
>
>
> --
> To unsubscribe - send a mail to qt-interest-request@xxxxxxxxxxxxx with "unsubscribe" in the subject or the body.
> List archive and information: http://lists.trolltech.com/qt-interest/
>
>

--
 [ signature omitted ] 

Message 3 in thread

Actually, the build system is make based and not qmake.
How do we turn on "QT += opengl" in such a case?

Please help.

Manjeet

"William Rush" <rush.william@xxxxxxxxx> wrote in message 
news:a92726de0710221324s1af6a9bh8a86baf3ccbc4258@xxxxxxxxxxxxxxxxx
> Have you activated QtOpenGL module at your qmake .pro file?
>
> Try this:
>
> ---- CUT HERE ----
> QT += opengl
> ---- CUT HERE ----
>
> 2007/10/22, Manjeet Dahiya <manjeetdahiya@xxxxxxxxx>:
>> Hi,
>>
>> I tried to build one small OpenGL application in our build system and got
>> following errors.
>>
>> Can anybody please help with this?
>>
>> Thanks
>> Manjeet Dahiya
>>
>> Tetrahedron.obj : error LNK2019: unresolved external symbol
>> __imp__glEnable@4 referenced in function "protected: virtual void __th
>> iscall Tetrahedron::initializeGL(void)" 
>> (?initializeGL@Tetrahedron@@MAEXXZ)
>> Tetrahedron.obj : error LNK2019: unresolved external symbol
>> __imp__glShadeModel@4 referenced in function "protected: virtual void
>> __thiscall Tetrahedron::initializeGL(void)"
>> (?initializeGL@Tetrahedron@@MAEXXZ)
>> Tetrahedron.obj : error LNK2019: unresolved external symbol 
>> __imp__glEnd@0
>> referenced in function "private: void __thiscall Tetrah
>> edron::draw(void)" (?draw@Tetrahedron@@AAEXXZ)
>> Tetrahedron.obj : error LNK2019: unresolved external symbol
>> __imp__glVertex3f@12 referenced in function "private: void __thiscall
>> Tetrahedron::draw(void)" (?draw@Tetrahedron@@AAEXXZ)
>> Tetrahedron.obj : error LNK2019: unresolved external symbol 
>> __imp__glBegin@4
>> referenced in function "private: void __thiscall Tetr
>> ahedron::draw(void)" (?draw@Tetrahedron@@AAEXXZ)
>> Tetrahedron.obj : error LNK2019: unresolved external symbol
>> __imp__glLoadName@4 referenced in function "private: void __thiscall T
>> etrahedron::draw(void)" (?draw@Tetrahedron@@AAEXXZ)
>> Tetrahedron.obj : error LNK2019: unresolved external symbol
>> __imp__glRotatef@16 referenced in function "private: void __thiscall T
>> etrahedron::draw(void)" (?draw@Tetrahedron@@AAEXXZ)
>> Tetrahedron.obj : error LNK2019: unresolved external symbol
>> __imp__glTranslatef@12 referenced in function "private: void __thiscal
>> l Tetrahedron::draw(void)" (?draw@Tetrahedron@@AAEXXZ)
>> Tetrahedron.obj : error LNK2019: unresolved external symbol
>> __imp__glLoadIdentity@0 referenced in function "private: void __thisca
>> ll Tetrahedron::draw(void)" (?draw@Tetrahedron@@AAEXXZ)
>> Tetrahedron.obj : error LNK2019: unresolved external symbol
>> __imp__glMatrixMode@4 referenced in function "private: void __thiscall
>>  Tetrahedron::draw(void)" (?draw@Tetrahedron@@AAEXXZ)
>> Tetrahedron.obj : error LNK2019: unresolved external symbol
>> __imp__glPopMatrix@0 referenced in function "private: int __thiscall T
>> etrahedron::faceAtPosition(class QPoint const &)"
>> (?faceAtPosition@Tetrahedron@@AAEHABVQPoint@@@Z)
>> Tetrahedron.obj : error LNK2019: unresolved external symbol
>> __imp__glFrustum@48 referenced in function "private: int __thiscall Te
>> trahedron::faceAtPosition(class QPoint const &)"
>> (?faceAtPosition@Tetrahedron@@AAEHABVQPoint@@@Z)
>> Tetrahedron.obj : error LNK2019: unresolved external symbol
>> _gluPickMatrix@36 referenced in function "private: int __thiscall Tetr
>> ahedron::faceAtPosition(class QPoint const &)"
>> (?faceAtPosition@Tetrahedron@@AAEHABVQPoint@@@Z)
>> Tetrahedron.obj : error LNK2019: unresolved external symbol
>> __imp__glPushMatrix@0 referenced in function "private: int __thiscall
>> Tetrahedron::faceAtPosition(class QPoint const &)"
>> (?faceAtPosition@Tetrahedron@@AAEHABVQPoint@@@Z)
>> Tetrahedron.obj : error LNK2019: unresolved external symbol
>> __imp__glPushName@4 referenced in function "private: int __thiscall Te
>> trahedron::faceAtPosition(class QPoint const &)"
>> (?faceAtPosition@Tetrahedron@@AAEHABVQPoint@@@Z)
>> Tetrahedron.obj : error LNK2019: unresolved external symbol
>> __imp__glInitNames@0 referenced in function "private: int __thiscall T
>> etrahedron::faceAtPosition(class QPoint const &)"
>> (?faceAtPosition@Tetrahedron@@AAEHABVQPoint@@@Z)
>> Tetrahedron.obj : error LNK2019: unresolved external symbol
>> __imp__glRenderMode@4 referenced in function "private: int __thiscall
>> Tetrahedron::faceAtPosition(class QPoint const &)"
>> (?faceAtPosition@Tetrahedron@@AAEHABVQPoint@@@Z)
>> Tetrahedron.obj : error LNK2019: unresolved external symbol
>> __imp__glSelectBuffer@8 referenced in function "private: int __thiscal
>> l Tetrahedron::faceAtPosition(class QPoint const &)"
>> (?faceAtPosition@Tetrahedron@@AAEHABVQPoint@@@Z)
>> Tetrahedron.obj : error LNK2019: unresolved external symbol
>> __imp__glGetIntegerv@8 referenced in function "private: int __thiscall
>>  Tetrahedron::faceAtPosition(class QPoint const &)"
>> (?faceAtPosition@Tetrahedron@@AAEHABVQPoint@@@Z)
>> Tetrahedron.obj : error LNK2019: unresolved external symbol 
>> __imp__glClear@4
>> referenced in function "protected: virtual void __thi
>> scall Tetrahedron::paintGL(void)" (?paintGL@Tetrahedron@@MAEXXZ)
>>
>>
>> --
>> To unsubscribe - send a mail to qt-interest-request@xxxxxxxxxxxxx with 
>> "unsubscribe" in the subject or the body.
>> List archive and information: http://lists.trolltech.com/qt-interest/
>>
>>
>
> --
> To unsubscribe - send a mail to qt-interest-request@xxxxxxxxxxxxx with 
> "unsubscribe" in the subject or the body.
> List archive and information: http://lists.trolltech.com/qt-interest/ 


--
 [ signature omitted ] 

Message 4 in thread

Manjeet Dahiya wrote:
> Actually, the build system is make based and not qmake.
> How do we turn on "QT += opengl" in such a case?
> 

>>> I tried to build one small OpenGL application in our build system and got
>>> following errors.
>>>
>>> Can anybody please help with this?
>>>
>>> Thanks
>>> Manjeet Dahiya
>>>
>>> Tetrahedron.obj : error LNK2019: unresolved external symbol
>>> __imp__glEnable@4 referenced in function "protected: virtual void __th

It should be clear from the symbols that are missing that glEnable and
other OpenGL API functions are not available for the linker. Add the
OpenGL library to the libraries passed to the linker.

- Adam

--
 [ signature omitted ] 

Message 5 in thread

Add to the Linker:     -lGLU -lGL 



Manjeet Dahiya wrote:
> Hi,
>
> I tried to build one small OpenGL application in our build system and got 
> following errors.
>
> Can anybody please help with this?
>
> Thanks
> Manjeet Dahiya
>
> Tetrahedron.obj : error LNK2019: unresolved external symbol 
> __imp__glEnable@4 referenced in function "protected: virtual void __th
> iscall Tetrahedron::initializeGL(void)" (?initializeGL@Tetrahedron@@MAEXXZ)
> Tetrahedron.obj : error LNK2019: unresolved external symbol 
> __imp__glShadeModel@4 referenced in function "protected: virtual void
> __thiscall Tetrahedron::initializeGL(void)" 
> (?initializeGL@Tetrahedron@@MAEXXZ)
> Tetrahedron.obj : error LNK2019: unresolved external symbol __imp__glEnd@0 
> referenced in function "private: void __thiscall Tetrah
> edron::draw(void)" (?draw@Tetrahedron@@AAEXXZ)
> Tetrahedron.obj : error LNK2019: unresolved external symbol 
> __imp__glVertex3f@12 referenced in function "private: void __thiscall
> Tetrahedron::draw(void)" (?draw@Tetrahedron@@AAEXXZ)
> Tetrahedron.obj : error LNK2019: unresolved external symbol __imp__glBegin@4 
> referenced in function "private: void __thiscall Tetr
> ahedron::draw(void)" (?draw@Tetrahedron@@AAEXXZ)
> Tetrahedron.obj : error LNK2019: unresolved external symbol 
> __imp__glLoadName@4 referenced in function "private: void __thiscall T
> etrahedron::draw(void)" (?draw@Tetrahedron@@AAEXXZ)
> Tetrahedron.obj : error LNK2019: unresolved external symbol 
> __imp__glRotatef@16 referenced in function "private: void __thiscall T
> etrahedron::draw(void)" (?draw@Tetrahedron@@AAEXXZ)
> Tetrahedron.obj : error LNK2019: unresolved external symbol 
> __imp__glTranslatef@12 referenced in function "private: void __thiscal
> l Tetrahedron::draw(void)" (?draw@Tetrahedron@@AAEXXZ)
> Tetrahedron.obj : error LNK2019: unresolved external symbol 
> __imp__glLoadIdentity@0 referenced in function "private: void __thisca
> ll Tetrahedron::draw(void)" (?draw@Tetrahedron@@AAEXXZ)
> Tetrahedron.obj : error LNK2019: unresolved external symbol 
> __imp__glMatrixMode@4 referenced in function "private: void __thiscall
>  Tetrahedron::draw(void)" (?draw@Tetrahedron@@AAEXXZ)
> Tetrahedron.obj : error LNK2019: unresolved external symbol 
> __imp__glPopMatrix@0 referenced in function "private: int __thiscall T
> etrahedron::faceAtPosition(class QPoint const &)" 
> (?faceAtPosition@Tetrahedron@@AAEHABVQPoint@@@Z)
> Tetrahedron.obj : error LNK2019: unresolved external symbol 
> __imp__glFrustum@48 referenced in function "private: int __thiscall Te
> trahedron::faceAtPosition(class QPoint const &)" 
> (?faceAtPosition@Tetrahedron@@AAEHABVQPoint@@@Z)
> Tetrahedron.obj : error LNK2019: unresolved external symbol 
> _gluPickMatrix@36 referenced in function "private: int __thiscall Tetr
> ahedron::faceAtPosition(class QPoint const &)" 
> (?faceAtPosition@Tetrahedron@@AAEHABVQPoint@@@Z)
> Tetrahedron.obj : error LNK2019: unresolved external symbol 
> __imp__glPushMatrix@0 referenced in function "private: int __thiscall
> Tetrahedron::faceAtPosition(class QPoint const &)" 
> (?faceAtPosition@Tetrahedron@@AAEHABVQPoint@@@Z)
> Tetrahedron.obj : error LNK2019: unresolved external symbol 
> __imp__glPushName@4 referenced in function "private: int __thiscall Te
> trahedron::faceAtPosition(class QPoint const &)" 
> (?faceAtPosition@Tetrahedron@@AAEHABVQPoint@@@Z)
> Tetrahedron.obj : error LNK2019: unresolved external symbol 
> __imp__glInitNames@0 referenced in function "private: int __thiscall T
> etrahedron::faceAtPosition(class QPoint const &)" 
> (?faceAtPosition@Tetrahedron@@AAEHABVQPoint@@@Z)
> Tetrahedron.obj : error LNK2019: unresolved external symbol 
> __imp__glRenderMode@4 referenced in function "private: int __thiscall
> Tetrahedron::faceAtPosition(class QPoint const &)" 
> (?faceAtPosition@Tetrahedron@@AAEHABVQPoint@@@Z)
> Tetrahedron.obj : error LNK2019: unresolved external symbol 
> __imp__glSelectBuffer@8 referenced in function "private: int __thiscal
> l Tetrahedron::faceAtPosition(class QPoint const &)" 
> (?faceAtPosition@Tetrahedron@@AAEHABVQPoint@@@Z)
> Tetrahedron.obj : error LNK2019: unresolved external symbol 
> __imp__glGetIntegerv@8 referenced in function "private: int __thiscall
>  Tetrahedron::faceAtPosition(class QPoint const &)" 
> (?faceAtPosition@Tetrahedron@@AAEHABVQPoint@@@Z)
> Tetrahedron.obj : error LNK2019: unresolved external symbol __imp__glClear@4 
> referenced in function "protected: virtual void __thi
> scall Tetrahedron::paintGL(void)" (?paintGL@Tetrahedron@@MAEXXZ) 
>
>
> --
> To unsubscribe - send a mail to qt-interest-request@xxxxxxxxxxxxx with "unsubscribe" in the subject or the body.
> List archive and information: http://lists.trolltech.com/qt-interest/
>
>
>   

--
 [ signature omitted ]