PDA

View Full Version : Tetrix Game error?



khanhsk
21st April 2011, 16:48
I'm doing tetrix game, when built the program, I get the following error message:

tetrixboard.obj:-1: error: LNK2001: unresolved external symbol "public: virtual struct QMetaObject const * __thiscall tetrixboard::metaObject(void)const " (?metaObject@tetrixboard@@UBEPBUQMetaObject@@XZ)

tetrixboard.obj:-1: error: LNK2001: unresolved external symbol "public: virtual void * __thiscall tetrixboard::qt_metacast(char const *)" (?qt_metacast@tetrixboard@@UAEPAXPBD@Z)

tetrixboard.obj:-1: error: LNK2001: unresolved external symbol "public: virtual void * __thiscall tetrixboard::qt_metacast(char const *)" (?qt_metacast@tetrixboard@@UAEPAXPBD@Z)

tetrixboard.obj:-1: error: LNK2019: unresolved external symbol "protected: void __thiscall tetrixboard::linesRemovedChanged(int)" (?linesRemovedChanged@tetrixboard@@IAEXH@Z) referenced in function "public: void __thiscall tetrixboard::start(void)" (?start@tetrixboard@@QAEXXZ)

tetrixboard.obj:-1: error: LNK2019: unresolved external symbol "protected: void __thiscall tetrixboard::linesRemovedChanged(int)" (?linesRemovedChanged@tetrixboard@@IAEXH@Z) referenced in function "public: void __thiscall tetrixboard::start(void)" (?start@tetrixboard@@QAEXXZ)

tetrixboard.obj:-1: error: LNK2019: unresolved external symbol "protected: void __thiscall tetrixboard::levelChanged(int)" (?levelChanged@tetrixboard@@IAEXH@Z) referenced in function "public: void __thiscall tetrixboard::start(void)" (?start@tetrixboard@@QAEXXZ)

I don't know much about this announcement. Who knows what that error is, post on forums so I can reference.
I've posted together with source files. You should read it.62726273627462756276 Thanks a lot !

squidge
21st April 2011, 18:02
Maybe you didn't include all files or you didn't run qmake.

stampede
21st April 2011, 18:03
I guess you need to moc the tetrixboard header. Try to clean and build the project again (make clean, qmake, make from console, or project->clean all, project->rebuild all in QtCreator).
Btw. you forgot to attach some files.

khanhsk
25th April 2011, 11:08
I've found a reason then, is the wrong project creation process. Thanks so much!:cool: