Results 1 to 4 of 4

Thread: Tetrix Game error?

  1. #1
    Join Date
    Apr 2011
    Posts
    7
    Thanks
    7
    Qt products
    Qt4
    Platforms
    Windows Symbian S60

    Default Tetrix Game error?

    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.tetrixpiece.cppmain.cppTetrix.protetrixboard.htetrixboard.cpp Thanks a lot !

  2. #2
    Join Date
    Sep 2009
    Location
    UK
    Posts
    2,447
    Thanks
    6
    Thanked 348 Times in 333 Posts
    Qt products
    Qt4
    Platforms
    Windows

    Default Re: Tetrix Game error?

    Maybe you didn't include all files or you didn't run qmake.

  3. The following user says thank you to squidge for this useful post:

    khanhsk (25th April 2011)

  4. #3
    Join Date
    Sep 2009
    Location
    Wroclaw, Poland
    Posts
    1,394
    Thanked 342 Times in 324 Posts
    Qt products
    Qt4 Qt5
    Platforms
    MacOS X Unix/X11 Windows Android

    Default Re: Tetrix Game error?

    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.

  5. The following user says thank you to stampede for this useful post:

    khanhsk (25th April 2011)

  6. #4
    Join Date
    Apr 2011
    Posts
    7
    Thanks
    7
    Qt products
    Qt4
    Platforms
    Windows Symbian S60

    Default Re: Tetrix Game error?

    I've found a reason then, is the wrong project creation process. Thanks so much!

Similar Threads

  1. game on qt
    By bibhukalyana in forum Qt Programming
    Replies: 6
    Last Post: 27th March 2011, 22:56
  2. Replies: 1
    Last Post: 22nd May 2010, 07:38
  3. IQ Game
    By qtgears in forum Qt-based Software
    Replies: 0
    Last Post: 6th October 2009, 08:24
  4. BlackJack The Game
    By raphaelf in forum Newbie
    Replies: 1
    Last Post: 2nd June 2008, 17:55
  5. Just for fun game
    By vermarajeev in forum Qt-based Software
    Replies: 6
    Last Post: 13th December 2007, 21:52

Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  
Qt is a trademark of The Qt Company.