Results 1 to 4 of 4

Thread: Compilation Error LNK2019 on QTest::qSleep

  1. #1
    Join Date
    Aug 2011
    Posts
    19
    Thanks
    9
    Qt products
    Qt4

    Question 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.
    Last edited by chiaminhsu; 31st January 2013 at 14:49.

  2. #2
    Join Date
    Jan 2008
    Location
    Alameda, CA, USA
    Posts
    5,230
    Thanks
    302
    Thanked 864 Times in 851 Posts
    Qt products
    Qt5
    Platforms
    Windows

    Default 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.

  3. The following user says thank you to d_stranz for this useful post:

    chiaminhsu (1st February 2013)

  4. #3
    Join Date
    Aug 2011
    Posts
    19
    Thanks
    9
    Qt products
    Qt4

    Default 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.
    Last edited by chiaminhsu; 1st February 2013 at 02:40.

  5. #4
    Join Date
    Jan 2008
    Location
    Alameda, CA, USA
    Posts
    5,230
    Thanks
    302
    Thanked 864 Times in 851 Posts
    Qt products
    Qt5
    Platforms
    Windows

    Default 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.

  6. The following user says thank you to d_stranz for this useful post:

    chiaminhsu (1st February 2013)

Similar Threads

  1. Compilation Error LNK2019
    By Afandi in forum Newbie
    Replies: 3
    Last Post: 23rd December 2012, 15:14
  2. error LNK2019: unresolved external symbol
    By 8080205 in forum Newbie
    Replies: 3
    Last Post: 3rd October 2012, 15:53
  3. Replies: 3
    Last Post: 29th April 2011, 09:13
  4. Replies: 4
    Last Post: 5th January 2011, 15:51
  5. error PRJ0019 while using qtest library
    By rajeshs in forum Qt Programming
    Replies: 4
    Last Post: 21st November 2007, 10:15

Tags for this Thread

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
  •  
Digia, Qt and their respective logos are trademarks of Digia Plc in Finland and/or other countries worldwide.