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. [SOLVED] Importing necessary dlls to application

[SOLVED] Importing necessary dlls to application

Scheduled Pinned Locked Moved General and Desktop
13 Posts 2 Posters 3.6k 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.
  • B Offline
    B Offline
    Binary91
    wrote on last edited by
    #1

    Hi,
    I reached the final step of my application now, I try to run it on any other computer then mine (i.e. there's no Qt stuff or mingw_32 stuff installed).
    Well, when trying to run the program, I get several errors:
    "Missing Qt5Core.dll"
    "Missing libgcc_s_dw2-1.dll"
    "Missing ....dll"
    and so on

    It is really dirty to copy and paste all those .dlls into the Application's working directory. Instead, I'd like to include them into my application.
    Problem is, I don't know how to do that... Has that anything to do with static library linking? But I thought I can only link libraries with suffix ".a" statically, wrong?

    Another solution would be something like an install routine, but I don't know how to do that (like importing the .dlls and installing them (exporting) on the other computer...

    Can anyone help me with that?

    1 Reply Last reply
    0
    • sierdzioS Offline
      sierdzioS Offline
      sierdzio
      Moderators
      wrote on last edited by
      #2

      Please see the official "deployment guide":http://qt-project.org/doc/qt-5/windows-deployment.html, especially the part about the deployment tool.

      Static linking is possible, but hard to achieve. It is also believed to be incompatible with LGPL license, so unless you are a commercial customer, or your application is Open Source, you can encounter legal problems.

      (Z(:^

      1 Reply Last reply
      0
      • B Offline
        B Offline
        Binary91
        wrote on last edited by
        #3

        Well, isn't there a simple way to import the dlls into my program and export ("install") them on the other computer?
        Before I started coding in C++, I coded with the script language Autohotkey, and there was a simple one-liner command to import any kind of file into my program and export it to the typed destination:
        @FileInstall, soure_file_path, dest_file_path@
        So how is that possible? I don't want to use a "big" installer, I'd like to do that on my own, just to import a hand full of dll files and export them later... Autohotkey itsself is written in c++, so there has to be a way to do that..

        Any solutions?

        1 Reply Last reply
        0
        • sierdzioS Offline
          sierdzioS Offline
          sierdzio
          Moderators
          wrote on last edited by
          #4

          Please read the link I have provided. You can use the windeployqt tool, which is a one-liner ;-)

          (Z(:^

          1 Reply Last reply
          0
          • B Offline
            B Offline
            Binary91
            wrote on last edited by
            #5

            Thank's for that! Now I have all the stuff I need to carry with my executable.
            But that will not finally solve my problem, because I'd really like to import all those files into my executable, so I can upload the executable to my website and a user can simply download and run it.
            There must be a way to import those files into the executable and export them on users computer to a specific destination... Like an installer, but it should be possible to do it without external tools...

            1 Reply Last reply
            0
            • sierdzioS Offline
              sierdzioS Offline
              sierdzio
              Moderators
              wrote on last edited by
              #6

              [quote author="Binary91" date="1415626008"]it should be possible to do it without external tools...[/quote]

              maybe it should, but it is not possible right now.

              As said, you can try static compilation, but it is not easy to make it work.

              (Z(:^

              1 Reply Last reply
              0
              • B Offline
                B Offline
                Binary91
                wrote on last edited by
                #7

                Oh my god, that sucks a bit.. Well, then I'll have to settle for the solution above, offering my program as a folder like it would be after an installation...

                Thank you for your support! :-)

                1 Reply Last reply
                0
                • sierdzioS Offline
                  sierdzioS Offline
                  sierdzio
                  Moderators
                  wrote on last edited by
                  #8

                  You can pack it into a zip, or even to sfx to make it self-executable. But that is still an additional step.

                  (Z(:^

                  1 Reply Last reply
                  0
                  • B Offline
                    B Offline
                    Binary91
                    wrote on last edited by
                    #9

                    Yep, already done. So at least, it's only one file :-P

                    1 Reply Last reply
                    0
                    • B Offline
                      B Offline
                      Binary91
                      wrote on last edited by
                      #10

                      Hi again,
                      at least, I spent a little time reading the source of AutoHotkey and its command "FileInstall".
                      Combining that with rummaging the windows MSDN website, I noticed the windows resource system (http://msdn.microsoft.com/en-us/library/windows/desktop/ff468900(v=vs.85).aspx).

                      I changed the pure C code and adjusted it to Qt standard. The result is a useful class that allows simple usage of an import/export routine to create setup files and extract its contents on other computers.
                      Only problem is, that this code might be Windows dependent. For those who are interested in a platform independent way, feel free to help yourself :-P

                      You can find the library and the User Interface I did on "this Wiki page":http://qt-project.org/wiki/Import-Export-resources-for-setup-creation :-)

                      1 Reply Last reply
                      0
                      • B Offline
                        B Offline
                        Binary91
                        wrote on last edited by
                        #11

                        code moved to "this wiki page":http://qt-project.org/wiki/Import-Export-resources-for-setup-creation <<

                        1 Reply Last reply
                        0
                        • B Offline
                          B Offline
                          Binary91
                          wrote on last edited by
                          #12

                          code moved to "this wiki page":http://qt-project.org/wiki/Import-Export-resources-for-setup-creation <<

                          1 Reply Last reply
                          0
                          • B Offline
                            B Offline
                            Binary91
                            wrote on last edited by
                            #13

                            code moved to "this wiki page":http://qt-project.org/wiki/Import-Export-resources-for-setup-creation <<

                            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