Problema a compilare classi in qt



  • Ogni volta che creo una classe mi ritornano 4 link error, ad esempio:

    1>AddressBook.obj : error LNK2001: unresolved external symbol "public: virtual struct QMetaObject const * __thiscall AddressBook::metaObject(void)const " (?metaObject@AddressBook@@UBEPBUQMetaObject@@XZ)
    1>AddressBook.obj : error LNK2001: unresolved external symbol "public: virtual void * __thiscall AddressBook::qt_metacast(char const *)" (?qt_metacast@AddressBook@@UAEPAXPBD@Z)
    1>AddressBook.obj : error LNK2001: unresolved external symbol "public: virtual int __thiscall AddressBook::qt_metacall(enum QMetaObject::Call,int,void * *)" (?qt_metacall@AddressBook@@UAEHW4Call@QMetaObject@@HPAPAX@Z)
    1>AddressBook.obj : error LNK2001: unresolved external symbol "public: static struct QMetaObject const AddressBook::staticMetaObject" (?staticMetaObject@AddressBook@@2UQMetaObject@@B)
    1>C:\Users\FABIO2\Documents\Visual Studio 2010\Projects\media_player_1\Debug\media_player_1.exe : fatal error LNK1120: 4 unresolved externals

    Qualcuno sa il perchè?



  • I think you may have forgotten to include QAxContainer.lib in your Additional Dependencies in your link properties of the project.
    regards, Harald.


Log in to reply
 

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