Linking Error



  • Hi ,
    Could not understand the exact error.
    But the class which used is already tested. But when integrated into project faced such errors.

    FrameSlider.obj : error LNK2001: unresolved external symbol "public: virtual struct QMetaObject const * __cdecl FrameSlider::metaObject(void)const " (?metaObject@FrameSlider@@UEBAPEBUQMetaObject@@XZ)
    FrameSlider.obj : error LNK2001: unresolved external symbol "public: virtual void * __cdecl FrameSlider::qt_metacast(char const *)" (?qt_metacast@FrameSlider@@UEAAPEAXPEBD@Z)
    FrameSlider.obj : error LNK2001: unresolved external symbol "public: virtual int __cdecl FrameSlider::qt_metacall(enum QMetaObject::Call,int,void * *)" (?qt_metacall@FrameSlider@@UEAAHW4Call@QMetaObject@@HPEAPEAX@Z)
    FrameSlider.obj : error LNK2019: unresolved external symbol "public: void __cdecl FrameSlider::frameMoved(double)" (?frameMoved@FrameSlider@@QEAAXN@Z) referenced in function "public: void __cdecl FrameSlider::drawCursor(class QPainter *)" (?drawCursor@FrameSlider@@QEAAXPEAVQPainter@@@Z)
    ......\bin\debug\CoralTool.exe : fatal error LNK1120: 4 unresolved externals



  • It could be just a path issue or cleaning up your project and rebuilding it.


  • Lifetime Qt Champion

    Hi,

    Since you're on Windows, did you properly export your classes symbols ?

    The technique is described here.



  • Hi SGaist,

    There is no dependency for the class used. And its already tested in my sample code(single class). But when it is moved into my project (i mean its with multiple classes), those errors are shown.


  • Lifetime Qt Champion

    What do you mean by move ? How exactly is your project constructed ?



  • @yuvaram said in Linking Error:

    But when integrated into project faced such errors.

    Maybe you have to run qmake to solve that problem.



  • @Defohin
    i have deleted build folder and made qmake. But same error while building (In Debug mode).
    But when its changed to release mode, there is no such error.



  • @yuvaram You can always provide some code so we can see what is going on.


Log in to reply
 

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