Compilation Error LNK2019 on QTest::qSleep
Hello, I overwrite an Qt 4.8.4 example in MSVC2010, and add <QtTest/QTest> to invoke QTest::qSleep()
The necessary lib and dll are also added in MSVC project, it works fine.
However, LNK2019 of QTest::qSleep() happens in Qt Creator.
Even I modify pro file
Qt += core gui test
LNK2019 still happens. Can you help to solve the problem ? thanks.
Re: Compilation Error LNK2019 on QTest::qSleep
Are you using the Qt add-in for Visual Studio? If you used it to convert the .pro file into a .vcproj file, then if you modify the .pro file, you need to create the .vcproj file again.
Re: Compilation Error LNK2019 on QTest::qSleep
I don't know Qt add-in for Visual Studio before. I will try it. Thanks
But my problem is that in VS QTest::sleap() is ok, however in Qt creator LNK2019 happens.
Added after 1 27 minutes:
Thank d_stranz. Qt add-in is useful.
I should not modify pro or vcproj manually without Qt add-in.
Re: Compilation Error LNK2019 on QTest::qSleep
The Qt add-in is very useful. You can import .pro files and create .vcproj files; you can also export .vcproj files and create .pro files so you can use both VS and Qt Creator if you want. The Qt add-in also has some very nice "wizards" to create new projects and classes.