Results 1 to 3 of 3

Thread: Compiler error with qtcreator and qtestlib

Threaded View

Previous Post Previous Post   Next Post Next Post
  1. #1
    Join Date
    Nov 2011
    Posts
    1
    Qt products
    Qt3 Qt4
    Platforms
    Unix/X11

    Default Compiler error with qtcreator and qtestlib

    Hi,
    In order to debug my current Qt project, I've created a second project containing my test classes and I have some issue with compilation :
    Qt Code:
    1. make: *** No rule to make target « ../git-cpim-/tests/mihmaptest.moc », needed by « mihmaptest.o ». Stop.
    To copy to clipboard, switch view to plain text mode 

    My Test class, my main and my .pro are quite basic.
    Qt Code:
    1. #include <QObject>
    2. #include <QtTest/QtTest>
    3.  
    4. class MihMapTest : public QObject{
    5. Q_OBJECT
    6.  
    7. private slots:
    8. void testFlux(){ QCOMPARE(0,0); }
    9. };
    10. #include "mihmaptest.moc"
    To copy to clipboard, switch view to plain text mode 
    Qt Code:
    1. int main(int argc, char* argv[]){
    2. QApplication app(argc, argv);
    3. MihMapTest hmaptest;
    4. QTest::qExec(&hmaptest, argc, argv);
    5. return 0;
    6. }
    To copy to clipboard, switch view to plain text mode 
    Qt Code:
    1. QT += core gui opengl testlib
    2. QT -= gui
    3.  
    4. TARGET = CPIMTest
    5. CONFIG += console qtestlib
    6.  
    7. TEMPLATE = app
    8.  
    9. QMAKE_CXXFLAGS += -DHAVE_CONFIG_H
    10.  
    11. SOURCES += tests/main.cpp \
    12. tests/mihmaptest.cpp
    13.  
    14. HEADERS += model/mihmap.h
    To copy to clipboard, switch view to plain text mode 

    What did I do wrong ?
    Thanks for your help.
    Last edited by azmeuk; 15th November 2011 at 12:19.

Similar Threads

  1. Missing manifest for QtCore4d.dll
    By walmit in forum Installation and Deployment
    Replies: 1
    Last Post: 2nd June 2012, 03:16
  2. QtCreator compiler options
    By soxs060389 in forum Installation and Deployment
    Replies: 2
    Last Post: 2nd December 2011, 00:19
  3. compiler and app error with qtcreator 2.3 and 4..7.4
    By creatio.x in forum Installation and Deployment
    Replies: 2
    Last Post: 6th September 2011, 09:16
  4. Replies: 8
    Last Post: 16th February 2011, 05:16
  5. Replies: 2
    Last Post: 28th April 2009, 08:37

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.