I wrote a simple console application HelloWorld and compiled it on Windows 7 using the MinGW compiler using one of the following commands:
gcc -Wall -pedantic Hello.c -o Hello.exe
g++ -Wall -pedantic Hello.cpp -o Hello.exe
However, the compiler associates some of its own dynamic libraries with the application, and when I copy the executable file to another Windows 7 computer that does not have MinGW installed, I get the missing library error. On Linux, this problem is solved by the package system, which automatically installs all the necessary libraries, but on Windows, of course, you do not want your users to install MinGW to run your program.
So my question is: how do I properly connect all the libraries and what else needs to be done to make the application run independently?
Although I believe that this should be a fundamental problem for all Windows programmers, I could not find answers on the Internet (maybe I just don’t know how and what to look for).
source
share