Page 1 of 2

libgcc_s_dw2-1.dll not found

Posted: Tue Dec 07, 2010 9:54 pm
by jjw1993
I downloaded the OGRE 1.7.2 SDK for MinGW, extracted, then made a new ogre project in code::blocks, but when i try to run it it says "This application has failed to start because libgcc_s_dw2-1.dll was not found. Re-installing the application may fix the problem." I have no clue where this file is or how to get it, any help is appreciated.

Re: libgcc_s_dw2-1.dll not found

Posted: Tue Dec 07, 2010 10:48 pm
by CABAListic
Sounds like you may have the wrong version of MinGW. You need the latest release from www.mingw.org.

Re: libgcc_s_dw2-1.dll not found

Posted: Tue Dec 07, 2010 11:41 pm
by jjw1993
I downloaded and installed it, but the same message comes up.

Re: libgcc_s_dw2-1.dll not found

Posted: Thu Dec 09, 2010 2:17 am
by MrWhy
Well, that isn't serious.
All MinGW executables that uses C/C++ routines, classes and libs are necessary linked against libgcc_s_dwxx-x.dll (GNU C lib) and libstdc++-xx.dll (GNU C++ STD lib) All these .dll can be found at the compiler's /bin directory.
All you have to do is to copy&paste those into your main executable's path.
For a static link version of this libs, you can add "-static-libgcc -static-libstdc++" to your compiler flags and you won't need this .dll anymore.
Your executable will be dramatically heavier, due to the internal addition of their contents, but it should be OK.

You even could add the /bin directory to your PATH environment variable with debugging intentions.
This way, you're able to call the .dll wherever your program is in your computer, but don't forget to make a decision when you're going to release your software.

Hope it helps!

Re: libgcc_s_dw2-1.dll not found

Posted: Thu Dec 09, 2010 9:11 am
by so0os
hmmm... my Mingw links against msvcrt.dll, Looks like a cross-compiler issue.

Re: libgcc_s_dw2-1.dll not found

Posted: Thu Dec 09, 2010 9:50 am
by ImpalerWrG
I'm having the same issue (libgcc_s_dw2-1.dll) and would rather not load up the distribution with yet another DLL so I'm trying to figure out static linking. Some of my other searching seems to indicate that -static-libgcc needs to be linker rather then compiler arguments (no mention of the other c++ option though my application is c++ so I likely need that). In either case I'm using CodeBlocks and am not quite sure how compiler and linker options are distinguished their.

Re: libgcc_s_dw2-1.dll not found

Posted: Thu Dec 09, 2010 10:52 am
by ImpalerWrG
It looks like this is all related to the switch to the Official MinGW in 1.7.2 from the previous TwilightDragonMedia version. It looks like your have to update that if you go to 1.7.2, This should be put on the various Dependency page as their are now ERRONEOUS and PROMINENT documents still telling people to use TDM. The -static args do in fact need to be linker options and I got them to and I am able to do without them, but I now have a libboost_thread-mgw45-mt-1_44.dll dependency but it's available in the Ogre SDK and I'm tired so I'll figure out a static linking for that later.

I found this page helpful, its one guy going through an Ogre setup with MinGW from scratch and having and documenting about every hitch imaginable

http://tb-nguyen.blogspot.com/2010/11/d ... al-12.html

And the whole upgrade to 1.7.2 was not in vane either, my Broken Debug Overlay is now working perfectly :D

Re: libgcc_s_dw2-1.dll not found

Posted: Fri Mar 11, 2011 8:44 am
by nixit28
Hey...
What is the solution???
i am running in the same problem...
and i can't get anything from above discussion.
can any one guide me....Lots of thanks in advance

Re: libgcc_s_dw2-1.dll not found

Posted: Fri Mar 11, 2011 8:47 am
by so0os
use old mingw with gcc 3.4, instead of 4.x crap.

Re: libgcc_s_dw2-1.dll not found

Posted: Fri Mar 11, 2011 9:13 am
by nixit28
I have ogre 1.7.2 is it works fine with 3.4 gcc?
i am using codeblocks in which mingw is included

Re: libgcc_s_dw2-1.dll not found

Posted: Fri Mar 11, 2011 9:14 am
by so0os
i dunno, i suppose it should.

Re: libgcc_s_dw2-1.dll not found

Posted: Fri Mar 11, 2011 9:19 am
by nixit28
Is there any other alternative

Re: libgcc_s_dw2-1.dll not found

Posted: Fri Mar 11, 2011 9:21 am
by so0os
yeah, find the lib, or don't use mingw at all

Re: libgcc_s_dw2-1.dll not found

Posted: Fri Mar 11, 2011 9:24 am
by nixit28
what it is?

Re: libgcc_s_dw2-1.dll not found

Posted: Fri Mar 11, 2011 9:26 am
by so0os
It's in Mingw/bin dir, if you had it shipped with codeblocks, it should be in codeblocks/bin or somewhere.

Re: libgcc_s_dw2-1.dll not found

Posted: Fri Mar 11, 2011 9:31 am
by nixit28
from which version i need to alter it ver-3 or ver-4

Re: libgcc_s_dw2-1.dll not found

Posted: Fri Mar 11, 2011 9:43 am
by jacmoe
You need to install the *latest* MinGW directly from the MinGW site.
That's the only thing which will do.

After that, you need to tell Code::Blocks to use that instead of the integrated MinGW.

Add C:\MinGW\bin to your PATH environment variable.

Re: libgcc_s_dw2-1.dll not found

Posted: Fri Mar 11, 2011 10:00 am
by nixit28
i done that... It is running...but, it's not good because it is not what i expected it shows me something like this
this is what i got in the command prompt
this is what i got in the command prompt

Re: libgcc_s_dw2-1.dll not found

Posted: Fri Mar 11, 2011 11:04 am
by WhirledPeas
I've got almost the same exact problem here. I've managed to find the requested .cfg file, so I'm not sure what the problem is. I've been trying to run the baseapplication that you download form this website, so I didn't even code anything yet.

I found this thread:

http://www.ogre3d.org/forums/viewtopic. ... 96&start=0

which mentions pretty much the same problem. The presented solution from that shouldn't apply to me because as far as I can tell the code that was suggested to be added to the program was already added as far as I can tell. I'm wondering if the problem stems from this particular bit of code:

Code: Select all

Ogre::ConfigFile cf;
    cf.load(mResourcesCfg);
perhaps the syntax for that line is wrong or something due to a version change since the BaseApplication project was uploaded?

thanks in advance

Re: libgcc_s_dw2-1.dll not found

Posted: Fri Mar 11, 2011 4:00 pm
by nixit28
still not getting...i also tried to changed the syntax as shown in...http://www.ogre3d.org/forums/viewtopic. ... 96&start=0
but not succeed.
you found somthing

Re: libgcc_s_dw2-1.dll not found

Posted: Fri Mar 11, 2011 5:34 pm
by WhirledPeas
Just to facilitate things, here is the exact text of the error in the console when the program crashes:
OGRE EXCEPTION(6:FileNotFoundException): 'resources_d.cfg' file not found! in ConfigFile::load at ../../../../../OgreMain/src/OgreConfigFile.cpp (line 83)

Re: libgcc_s_dw2-1.dll not found

Posted: Fri Mar 11, 2011 6:09 pm
by nixit28
wait....have youadd some cfg files to your project.
which is placed in yr bin dir.

Re: libgcc_s_dw2-1.dll not found

Posted: Fri Mar 11, 2011 6:22 pm
by WhirledPeas
I'm at work presently, so I can't check the exact file locations, but I believe that I did do that. bin is the directory where 'DEBUG' and 'RELEASE' are located right? Also, I was wondering if not having a 'RELEASE' folder could be the possible cause of the problem.

EDIT: did some more looking and found about a program called filemon which when running logs all attempts to access files and whether it was successful as well as the location that was being looked in. I'll give it a try when I get home from work.

Re: libgcc_s_dw2-1.dll not found

Posted: Fri Mar 11, 2011 6:39 pm
by nixit28
Release folder is not there because u haven't build yr project in release mode...
but it won't be a problem u need to copy file from debug to debug

Re: libgcc_s_dw2-1.dll not found

Posted: Fri Mar 11, 2011 6:41 pm
by nixit28
Now i got one another problem...
after compiling it stared cmd prompt and then told me {Proj_Name].exe has stop working