Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Program can't start because *.dll is missing - MinGW, Eclipse, Windows 7

Tags:

c++

eclipse

mingw

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.

like image 202
user988066 Avatar asked Oct 10 '11 16:10

user988066


1 Answers

The "real" solution is indeed to copy the DLL locally. You have to ship that dll when shipping your EXE.

like image 63
Joshua Avatar answered Sep 29 '22 00:09

Joshua