Skip to content
  • Categories
  • Recent
  • Tags
  • Popular
  • Users
  • Groups
  • Search
  • Get Qt Extensions
  • Unsolved
Collapse
Brand Logo
  1. Home
  2. Qt Development
  3. General and Desktop
  4. Test built with QTestLib complains about missing Qt5Core.dll
QtWS25 Last Chance

Test built with QTestLib complains about missing Qt5Core.dll

Scheduled Pinned Locked Moved General and Desktop
2 Posts 2 Posters 1.3k Views
  • Oldest to Newest
  • Newest to Oldest
  • Most Votes
Reply
  • Reply as topic
Log in to reply
This topic has been deleted. Only users with topic management privileges can see it.
  • D Offline
    D Offline
    dualfaces
    wrote on last edited by
    #1

    Hello,

    Im new to testing using Qt, therefore i wanted to built a very simple QString test like "here":http://qt-project.org/doc/qt-4.8/qtestlib-tutorial1.html .
    Therefore i added a Test_Simple.cpp in a directory MyProject/tests/unit/Test_Simple.cpp with the following content:
    @
    #include <QtTest/QtTest>

    class Test_Simple : public QObject
    {
    Q_OBJECT
    public slots:
    void test();
    };

    void Test_Simple::test() {
    QString str = "hallo";
    QVERIFY(str.toUpper() == "HALLO");
    }

    QTEST_MAIN(Test_Simple)
    #include "Test_Simple.moc"
    @
    Then i run (from command line)
    @
    C:\Qt\5.2.0\mingw48_32\bin\qmake -project "Qt +=testlib"
    C:\Qt\5.2.0\mingw48_32\bin\qmake
    C:\Qt\Tools\mingw48_32\bin\mingw32_make.exe
    @

    Everything builds fine and it creates a unit.exe in a release directory, but when i try to execute it says "Program could not be started, because Qt5Core.dll is missing.
    Do i have to copy the Qt Dlls in a system directory in order to execute the app or can i manually tell him where to search?

    Of Course everything works if I copy the DLLs into the directory, but that is not very convenient...

    Thank you!

    Kind Regards!

    1 Reply Last reply
    0
    • raven-worxR Offline
      raven-worxR Offline
      raven-worx
      Moderators
      wrote on last edited by
      #2

      [quote author="dualfaces" date="1387544925"]
      Do i have to copy the Qt Dlls in a system directory in order to execute the app or can i manually tell him where to search?
      [/quote]
      Either way copy the necessary DLLs along with your exe or let it find it by itself by inserting the path containing the DLLs in the PATH environment variable.

      --- SUPPORT REQUESTS VIA CHAT WILL BE IGNORED ---
      If you have a question please use the forum so others can benefit from the solution in the future

      1 Reply Last reply
      0

      • Login

      • Login or register to search.
      • First post
        Last post
      0
      • Categories
      • Recent
      • Tags
      • Popular
      • Users
      • Groups
      • Search
      • Get Qt Extensions
      • Unsolved