Program can't start because *.dll is missing - MinGW, Eclipse, Windows 7
The "real" solution is indeed to copy the DLL locally. You have to ship that dll when shipping your EXE.
user988066
Updated on August 11, 2022Comments
-
user988066 almost 2 years
I am well aware of the fact that a multitude of similar problems already appeared on this board, however none of the solutions helped me.
I am trying to get Eclipse CDT running with MinGW toolchain on Windows 7 Service Pack 1. I already did that on Windows XP and thought that the same procedure will make it run smoothly on Windows 7, but it seems I was mistaken ;)
After installing MinGW from the automatic installer (just in case I installed a few things more than what I needed) and adding the C:/MinGW/bin to my PATH environment variable, I tried to compile a simple Hello, World! program. Eclipse did not give me any errors, but it didn't want to give any output in the Console window. Alarmed, I tried to run the executable file outside of Eclipse and got the error that
"Program can't start because libstdc++-6.dll is missing".
Strangely enough, this dll is in the C:/minGW/bin directory, so the PATH variable should 'find' it - but it does not. Copying the dll to the directory with the executable file helped, but it is obviously a short-term solution and I would prefer to have a more "normal" one.
The thing that makes my problem different, I think, from the others I've noticed on this board is the fact that, for one, Eclipse does not find any errors with my PATH variable (which it usually does, if the MinGW was not included in the Path variable or something), and besides the required dlls are where they should be, but it seems my Windows can't find them.
-
user988066 over 12 yearsWell, that seems unnecessarily complicated. Besides, I've seen implementations of Eclipse on Windows 7 that ran flawlessly without any similar shenanigans - hence, what wrong can be with mine?
-
vpalmu over 12 yearsYou could pass -static to gcc.
-
user988066 over 12 yearsWhich, in layman's terms, means...? Where do I do that in Eclipse?
-
vpalmu over 12 yearsIt means linking the program statically, which places the DLL inside the EXE.