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 :
make: *** No rule to make target « ../git-cpim-/tests/mihmaptest.moc », needed by « mihmaptest.o ». Stop.
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.
#include <QObject>
#include <QtTest/QtTest>
Q_OBJECT
private slots:
void testFlux(){ QCOMPARE(0,0); }
};
#include "mihmaptest.moc"
#include <QObject>
#include <QtTest/QtTest>
class MihMapTest : public QObject{
Q_OBJECT
private slots:
void testFlux(){ QCOMPARE(0,0); }
};
#include "mihmaptest.moc"
To copy to clipboard, switch view to plain text mode
int main(int argc, char* argv[]){
MihMapTest hmaptest;
QTest::qExec(&hmaptest, argc, argv);
return 0;
}
int main(int argc, char* argv[]){
QApplication app(argc, argv);
MihMapTest hmaptest;
QTest::qExec(&hmaptest, argc, argv);
return 0;
}
To copy to clipboard, switch view to plain text mode
QT += core gui opengl testlib
QT -= gui
TARGET = CPIMTest
CONFIG += console qtestlib
TEMPLATE = app
QMAKE_CXXFLAGS += -DHAVE_CONFIG_H
SOURCES += tests/main.cpp \
tests/mihmaptest.cpp
HEADERS += model/mihmap.h
QT += core gui opengl testlib
QT -= gui
TARGET = CPIMTest
CONFIG += console qtestlib
TEMPLATE = app
QMAKE_CXXFLAGS += -DHAVE_CONFIG_H
SOURCES += tests/main.cpp \
tests/mihmaptest.cpp
HEADERS += model/mihmap.h
To copy to clipboard, switch view to plain text mode
What did I do wrong ?
Thanks for your help.
Bookmarks