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. Deploying .exe file on different computer
Forum Updated to NodeBB v4.3 + New Features

Deploying .exe file on different computer

Scheduled Pinned Locked Moved General and Desktop
4 Posts 3 Posters 998 Views 1 Watching
  • 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.
  • I Offline
    I Offline
    Ivan1120
    wrote on last edited by
    #1

    Hi guys:
    I knew .exe built by Qt that if we need to deploy to other computers, we also need to pack some dll file(QtCore... etc). How do I make my application to find the dlls that is not in current folder? it means wherever my application is located, my application always can find dll in the same path and run perfectly. I refer the document which link is follows:
    http://qt-project.org/doc/qt-4.8/deployment-windows.html

    But it's not work.The simple code look like these:
    @
    QApplication a(argc, argv);
    a.addLibraryPath("C:\Windows\Qtdll");
    MainWindow w;
    w.show();
    @
    Thanks in advance for reply.

    1 Reply Last reply
    0
    • JKSHJ Offline
      JKSHJ Offline
      JKSH
      Moderators
      wrote on last edited by
      #2

      Hi,

      You don't need addLibraryPath().

      What version of Qt are you using? Follow the tutorial at http://qt-project.org/wiki/Deploy_an_Application_on_Windows (It's written for Qt 5, but the steps are similar for Qt 4 too)

      Qt Doc Search for browsers: forum.qt.io/topic/35616/web-browser-extension-for-improved-doc-searches

      1 Reply Last reply
      0
      • hskoglundH Online
        hskoglundH Online
        hskoglund
        wrote on last edited by
        #3

        Hi, there's a "good guide here":http://qt-project.org/wiki/Deploy_an_Application_on_Windows

        Also I posted in my blog on "how to deploy":http://www.tripleboot.org/?p=138 and "why deploying this way":http://www.tripleboot.org/?p=536

        addLibraryPath needs to be called before QApplication a(argc, argv); it has no effect for normal DLLs like Qt5Core.dll, Qt5Gui.dll, but you can read more about it :-)

        1 Reply Last reply
        0
        • I Offline
          I Offline
          Ivan1120
          wrote on last edited by
          #4

          Thanks you, guys:)). Finally I used "Inno Setup5" to deploy the dll from qt.

          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