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. Plain C++ project dependency issue

Plain C++ project dependency issue

Scheduled Pinned Locked Moved General and Desktop
plain c++ depen
4 Posts 3 Posters 1.5k 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.
  • C Offline
    C Offline
    Codehack
    wrote on last edited by
    #1

    Hello.

    I am writing a simple application to connect to an IRC server in order to practice but I found out an issue that annoys me. I compiled the project (Plain C++ project) with MingGW compiler but I realised that in order to run the output I either need to build it statically or I need to install several dlls on my system.

    Is there any way I can work this around? Some of the missing libraries are libgcc_s_dw2-1.dll and libwinpthread-1.dll. I do not want my potential users to install additional items and a static build increases the size of the file way more than my likings.

    Do those files come with any C++ redistributable or something? Any information would be quite welcome.

    Thanks a lot!

    JKSHJ 1 Reply Last reply
    0
    • C Codehack

      Hello.

      I am writing a simple application to connect to an IRC server in order to practice but I found out an issue that annoys me. I compiled the project (Plain C++ project) with MingGW compiler but I realised that in order to run the output I either need to build it statically or I need to install several dlls on my system.

      Is there any way I can work this around? Some of the missing libraries are libgcc_s_dw2-1.dll and libwinpthread-1.dll. I do not want my potential users to install additional items and a static build increases the size of the file way more than my likings.

      Do those files come with any C++ redistributable or something? Any information would be quite welcome.

      Thanks a lot!

      JKSHJ Offline
      JKSHJ Offline
      JKSH
      Moderators
      wrote on last edited by
      #2

      Hi, and welcome to the Qt Dev Net!

      @Codehack said:

      I compiled the project (Plain C++ project) with MingGW compiler but I realised that in order to run the output I either need to build it statically or I need to install several dlls on my system.

      That's happens with all C++ projects.

      Is there any way I can work this around? Some of the missing libraries are libgcc_s_dw2-1.dll and libwinpthread-1.dll. I do not want my potential users to install additional items and a static build increases the size of the file way more than my likings.

      Do those files come with any C++ redistributable or something?

      • If your application is built with MinGW, your users would need libgcc_s_dw2-1.dll and libwinpthread-1.dll (and don't forget libstdc++-6.dll).
      • If your application is built with Visual Studio 2013, your users would need msvcr120.dll and msvcp120.dll instead.

      The difference is that you can ask your users to download and install "Visual C++ Redistributable" to satisfy the Visual Studio dependencies, but there's no installer for the MinGW dependencies

      However, you don't need to ask your users to install anything extra. Simply provide the DLLs in the same folder as your application executable.

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

      1 Reply Last reply
      0
      • C Offline
        C Offline
        Codehack
        wrote on last edited by
        #3

        So, I guess that compiling my project with MSVC compiler on Qt Creator will make the application dependant to msvcr120.dll and msvcp120.dll or it only applies for Visual Studio-built programs?

        1 Reply Last reply
        0
        • M Offline
          M Offline
          mcosta
          wrote on last edited by mcosta
          #4

          The executable is independent form the IDE used, but it requires libraries from compiler.

          So the answer is, YES you need to deploy msvc*120.dll to the target machine

          Once your problem is solved don't forget to:

          • Mark the thread as SOLVED using the Topic Tool menu
          • Vote up the answer(s) that helped you to solve the issue

          You can embed images using (http://imgur.com/) or (http://postimage.org/)

          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