Momergil
27th June 2014, 14:59
Hello!
I'm trying to build a benchmark application for some tests with Qt. I was going to use QElapsedTimer when I found this article (http://qt-project.org/doc/qt-4.8/qtestlib-tutorial5.html) telling about the usage of QBENCHMARK macro for doing such a work. I tried to implement it in my code after including QtTest (using Qt 4.8) and Qt Creator returned me lots of undefined reference errors.
//in .cpp
#include <QtTest/QtTest>
using namespace QTest;
//...
void MainWindow::on_startQBenchmark_clicked()
{
QBENCHMARK {
int aaa = 0;
}
}
Image:
10463
I can't understand why is that happening :(
Thanks,
Momergil
Edit: I noticed now that the compiler errors appears even if I don't call QBENCHMARK.
I'm trying to build a benchmark application for some tests with Qt. I was going to use QElapsedTimer when I found this article (http://qt-project.org/doc/qt-4.8/qtestlib-tutorial5.html) telling about the usage of QBENCHMARK macro for doing such a work. I tried to implement it in my code after including QtTest (using Qt 4.8) and Qt Creator returned me lots of undefined reference errors.
//in .cpp
#include <QtTest/QtTest>
using namespace QTest;
//...
void MainWindow::on_startQBenchmark_clicked()
{
QBENCHMARK {
int aaa = 0;
}
}
Image:
10463
I can't understand why is that happening :(
Thanks,
Momergil
Edit: I noticed now that the compiler errors appears even if I don't call QBENCHMARK.