OpenGL QGLWidget help needed!



  • main.obj:-1: error: LNK2019: unresolved external symbol "__declspec(dllimport) public: __cdecl QGLFormat::QGLFormat(class QFlags<enum QGL::FormatOption>,int)" (_imp??0QGLFormat@@QEAA@V?$QFlags@W4FormatOption@QGL@@@@H@Z) referenced in function main
    File not found:main.obj

    What can one to with this any one with an idea.?


  • Moderators

    i have to ask:
    are you sure you have a Qt version with OpenGL support? :)
    Also you need to link against the OpenGL module (in your PRO file).
    @
    QT += opengl
    @



  • Yes,
    Thank you very much.
    I have solved the problem.



  • scene.obj:-1: error: LNK2019: unresolved external symbol "public: __cdecl QtBox::QtBox(int,int,int)" (??0QtBox@@QEAA@HHH@Z) referenced in function "public: __cdecl Scene::Scene(int,int,int)" (??0Scene@@QEAA@HHH@Z)

    Could you help with this please code error.? what could be wrong in the code,?



  • it seems you miss the QtBox's definition code, .cpp file where is implemented ...


  • Moderators

    "unresolved external symbol" error message always means that the linker can't find the implementation of the code.

    Either you

    • don't link against the library containing the implementation, or
    • just forgot to add the file containing the implementing (most probably the cpp file) into your project


  • Thank you very much. problem resolved.



  • What is the maximum depth buffer one can use for numerical precision 32bit or 64bit, to avoid undesirable clipping on image scale and large detailed geometry calculations?


  • Moderators

    The usual depth buffers are 24 or 32 bit.
    There are certain techniques to fight precision problems. first of all make sure you set clipping planes tightly around your geometry to maximize the use of available precision.
    Another thing to think about is using non-linear depth buffer. There are different approaches suitable for specific needs so you'll have to figure out which is the best for you.
    Here's a great comparison of different formats you can try: "Attack of the depth buffer":http://mynameismjp.wordpress.com/2010/03/22/attack-of-the-depth-buffer/ . It uses DirectX but it's mostly the same with OpenGL.


Log in to reply
 

Looks like your connection to Qt Forum was lost, please wait while we try to reconnect.