Allegro.cc - Online Community

Allegro.cc Forums » Programming Questions » libstdc++-6.dll is missing?

This thread is locked; no one can reply to it. rss feed Print
libstdc++-6.dll is missing?
Desmond Taylor
Member #11,943
May 2010
avatar

EDIT: This has now been fixed - Pass "-static-libstdc++" in the linker options to avoid needing the .dll

Hi, I have just re-installed windows with Windows 7 Ultimate 32 bit and installed Code::Blocks 10.05. I then installed MingW from their website so that I have the latest copy but...

I now get this error when trying to run the Executable. With Code::Blocks that comes with MingW all set up I do not get this error.

{"name":"604092","src":"\/\/djungxnpq2nug.cloudfront.net\/image\/cache\/e\/a\/eaeea2cfff56553ab619d195a67481d2.png","w":445,"h":70,"tn":"\/\/djungxnpq2nug.cloudfront.net\/image\/cache\/e\/a\/eaeea2cfff56553ab619d195a67481d2"}604092

Is there a linker option I should know about as this is the first time me setting up my coding environment this way.

Edit: Fixed Code::Blocks version since I wrote it wrong. ;D

AMCerasoli
Member #11,955
May 2010
avatar

You could follow these instructions to see if you did something wrong.

Desmond Taylor
Member #11,943
May 2010
avatar

Look at my fist post as I've already fixed it. Thanks anyway's :)

Edgar Reynaldo
Member #8,592
May 2007
avatar

In case you are using C instead, use -static-libgcc to statically link the standard C library with MinGW 4.5.0.

Desmond Taylor
Member #11,943
May 2010
avatar

Thanks Edgar, That will help people that are coding in C instead :)

Kitty Cat
Member #2,815
October 2002
avatar

Note that adding -static-libstdc++ will add a good 3.2MB to your app/dll (and -static-libgcc, to avoid libgcc_s_sjlj-1.dll, adds another 100KB or so). If you're using multiple mingw-built dlls and exes, it may be better to use and provide the dynamic dlls.

--
"Do not meddle in the affairs of cats, for they are subtle and will pee on your computer." -- Bruce Graham

Edgar Reynaldo
Member #8,592
May 2007
avatar

libstdc++.a is only 2.2MB, and libgcc.a is only 116KB. If you strip unused symbols from your executable using -s after all your linking flags then you'll probably only use a small fraction of those libraries.

Desmond Taylor
Member #11,943
May 2010
avatar

I already use -s and my executable is only 728KB atm. That just sets up allegro opens a window loads a bitmap and displays it twice.

Edit: Updated the size because I wrote it as 8KB. ;D

weapon_S
Member #7,859
October 2006
avatar

When I pass "-static-libstdc++" and "-s" to the compiler, I will get a smaller 'distribution version' ?! That's nice to know :) Maybe I can static link all of those MinGW dll's...

Desmond Taylor
Member #11,943
May 2010
avatar

I static linked all the ones it complains is missing so all my game needs is the media and the exe :P

Go to: