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