Results 1 to 7 of 7

Thread: Problem when linking a Qt Unit Test with CMake

Hybrid View

Previous Post Previous Post   Next Post Next Post
  1. #1
    Join Date
    Apr 2008
    Posts
    196
    Thanked 8 Times in 6 Posts
    Qt products
    Qt4
    Platforms
    MacOS X Unix/X11 Windows
    Wiki edits
    1

    Default Re: Problem when linking a Qt Unit Test with CMake

    I think the problem is only when using MinGW, but anyway, how can I solve this problem without including the "*.moc" at the end of the file?

    Thanks in advance

  2. #2
    Join Date
    May 2010
    Posts
    23
    Thanks
    2
    Qt products
    Qt4
    Platforms
    Unix/X11 Windows

    Default Re: Problem when linking a Qt Unit Test with CMake

    http://qtnode.net/wiki/Qt4_with_cmake :

    If you don't use the #include "header.moc" convention, you can use the QT4_WRAP_CPP macro. This generates a list of moc_xxxx.cxx files to be generated. You pass in the list of headers to be moc'ed, and get back a list of source files to add to your build target. This is similar to how qmake works with Qt4

  3. #3
    Join Date
    Apr 2008
    Posts
    196
    Thanked 8 Times in 6 Posts
    Qt products
    Qt4
    Platforms
    MacOS X Unix/X11 Windows
    Wiki edits
    1

    Default Re: Problem when linking a Qt Unit Test with CMake

    The problem is, that I only have a "main.cpp" file, it doesn't use any header files.

Similar Threads

  1. How can we make unit test for multithread in QT
    By learning_qt in forum Qt Programming
    Replies: 8
    Last Post: 15th January 2013, 16:09
  2. Replies: 4
    Last Post: 7th May 2012, 15:39
  3. Unit test coverage
    By leoalvesmachado in forum Newbie
    Replies: 3
    Last Post: 16th April 2010, 13:48
  4. Unit Test Organisation, and having qmake what I want
    By jrharshath in forum Qt Programming
    Replies: 1
    Last Post: 15th September 2009, 18:59
  5. How to unit test a Qt Gui
    By mitskits in forum Qt Programming
    Replies: 1
    Last Post: 20th January 2006, 07:36

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.