I am trying to create a "Qt unit test" following this tutorial. I created a new project: Qt Gui Application with a header file as mentioned and a class that contains the test function. I added #CONFIG += testlib
to my ".pro" file
. However, when I run my code, I get this errors:
In function `simulateEvent':
- error: undefined reference to `_imp___ZN5QTest15defaultKeyDelayEv'
- error: undefined reference to `_imp___ZN5QTest15defaultKeyDelayEv'
- error: undefined reference to `_imp___ZN5QTest5qWarnEPKcS1_i'
then in function 'mouseEvent':
- error: undefined reference to `_imp___ZN5QTest17defaultMouseDelayEv'
- error: undefined reference to `_imp___ZN5QTest17defaultMouseDelayEv'
- error: undefined reference to `_imp___ZN5QTest17defaultMouseDelayEv'
- error: undefined reference to `_imp___ZN5QTest17defaultMouseDelayEv'
- error: undefined reference to `_imp___ZN5QTest5qWarnEPKcS1_i'
then in function 'simulateEvent' again:
- error: undefined reference to `_imp___ZN5QTest15defaultKeyDelayEv'
- error: undefined reference to `_imp___ZN5QTest15defaultKeyDelayEv'
- error: undefined reference to `_imp___ZN5QTest5qWarnEPKcS1_i'
then in function 'mouseEvent' again:
- error: undefined reference to `_imp___ZN5QTest17defaultMouseDelayEv'
- error: undefined reference to `_imp___ZN5QTest17defaultMouseDelayEv'
- error: undefined reference to `_imp___ZN5QTest17defaultMouseDelayEv'
- error: undefined reference to `_imp___ZN5QTest17defaultMouseDelayEv'
- error: undefined reference to `_imp___ZN5QTest5qWarnEPKcS1_i'
I could not find any explanation for this as everything looks right . what am I missing ?