Welcome, Guest. Please login or register. Did you miss your activation email?

Author Topic: libgcc_s_dw2-1.dll missing error  (Read 34426 times)

0 Members and 1 Guest are viewing this topic.

julescoder

  • Newbie
  • *
  • Posts: 7
    • View Profile
libgcc_s_dw2-1.dll missing error
« on: July 04, 2010, 06:56:52 pm »
Hi,
    I have googled for a solution for this prob. But i havent quite understood the solutions.

I am using netbeans and mingw on windows xp to complile an SFML app.
I get the error libgcc_s_dw2-1.dll missing, when i run the app.

Can anyone whose knowledgeable about this mingw issue tell me the solution to this prob ?

Thankx in advance!  :)

Laurent

  • Administrator
  • Hero Member
  • *****
  • Posts: 32504
    • View Profile
    • SFML's website
    • Email
libgcc_s_dw2-1.dll missing error
« Reply #1 on: July 04, 2010, 07:28:39 pm »
Copy the DLL (it's in mingw/bin), or use the -static-libgcc linker option.
Laurent Gomila - SFML developer

julescoder

  • Newbie
  • *
  • Posts: 7
    • View Profile
libgcc_s_dw2-1.dll missing error
« Reply #2 on: July 04, 2010, 07:43:53 pm »
I checked the bin folder, and there are only 2 dlls :
1.    exchndl.dll
2.    mingwm10.dll

I am using GCC c++ compiler 3.4.5
I took it off the codeblocks 8.02 intall folder.


Also, the -static-libgcc command doesnt work. It still asks for the blasted dll.
 :)

Laurent

  • Administrator
  • Hero Member
  • *****
  • Posts: 32504
    • View Profile
    • SFML's website
    • Email
libgcc_s_dw2-1.dll missing error
« Reply #3 on: July 04, 2010, 08:27:50 pm »
This is when using gcc 4 only. gcc 3.4.5 doesn't require this DLL.

Both versions are not compatible anyway, so you should upgrade to gcc 4 or compile SFML with gcc 3.4.5.
Laurent Gomila - SFML developer

Svenstaro

  • Full Member
  • ***
  • Posts: 222
    • View Profile
libgcc_s_dw2-1.dll missing error
« Reply #4 on: July 04, 2010, 09:18:26 pm »
Laurent, perhaps you should mention in the downloads that your version is created using dw2 unwinding. TDM still defaults to sjlj unwinding.

Laurent

  • Administrator
  • Hero Member
  • *****
  • Posts: 32504
    • View Profile
    • SFML's website
    • Email
libgcc_s_dw2-1.dll missing error
« Reply #5 on: July 04, 2010, 10:35:14 pm »
Quote
Laurent, perhaps you should mention in the downloads that your version is created using dw2 unwinding. TDM still defaults to sjlj unwinding.

Absolutely.
Laurent Gomila - SFML developer

julescoder

  • Newbie
  • *
  • Posts: 7
    • View Profile
libgcc_s_dw2-1.dll missing error
« Reply #6 on: July 05, 2010, 04:42:40 pm »
Thanks for your replies. I downloded a copy of the dll by googling it. In future i will probably upgrade to gcc 4.

kullerhamPster

  • Newbie
  • *
  • Posts: 40
    • View Profile
libgcc_s_dw2-1.dll missing error
« Reply #7 on: July 16, 2010, 02:17:34 pm »
I have a very similar problem, I'm just trying out the latest release of Code::Blocks, which also supports an SFML project template.

This template doesn't seem to work out of the box, but I managed to make it compile after some modifications. However, when I try to run the program, I also get an error that libgcc_s_dw2-1.dll is missing.
The file doesn't seem to exits in mingw's bin directory, there's only a libgcc_s_sjlj-1.dll in that dir. Adding the -static-libgcc linker option doesn't seem to help either.
I use the version of MinGW that was included with Code::Blocks, which seems to be 4.4.1

Laurent

  • Administrator
  • Hero Member
  • *****
  • Posts: 32504
    • View Profile
    • SFML's website
    • Email
libgcc_s_dw2-1.dll missing error
« Reply #8 on: July 16, 2010, 02:46:33 pm »
This is not the same version. SFML uses the Dwarf2 version of gcc, not the SJLJ one (these acronyms refer to how the exception system is implemented).

It really sucks that gcc 4 has two different implementations on Windows...
Laurent Gomila - SFML developer

kullerhamPster

  • Newbie
  • *
  • Posts: 40
    • View Profile
libgcc_s_dw2-1.dll missing error
« Reply #9 on: July 16, 2010, 03:46:25 pm »
Quote from: "Laurent"
This is not the same version. SFML uses the Dwarf2 version of gcc, not the SJLJ one (these acronyms refer to how the exception system is implemented).

It really sucks that gcc 4 has two different implementations on Windows...


Thanks for the quick reply. Do you have an idea why the -static-libgcc doesn't have any effect?

Laurent

  • Administrator
  • Hero Member
  • *****
  • Posts: 32504
    • View Profile
    • SFML's website
    • Email
libgcc_s_dw2-1.dll missing error
« Reply #10 on: July 16, 2010, 03:55:54 pm »
No, sorry. I've never used the SJLJ version of gcc. But anyway, you shouldn't mix these two different versions.
Laurent Gomila - SFML developer

Zop

  • Newbie
  • *
  • Posts: 1
    • AOL Instant Messenger - QuakeZop
    • View Profile
libgcc_s_dw2-1.dll missing error
« Reply #11 on: July 05, 2011, 08:28:24 pm »
I had this same problem with Windows/MinGW 4.4.1, and after reading about sjlj/dwarf, I downloaded the newest installer from here: sourceforge. This version does use libgcc_s_dw2-1.dll, and I was finally able to compile from the Code::Blocks SFML template. (I also had to remove ".dll" from the premade project included files, as I read in another thread.)

Sorry for the old bump, but this is for anyone left running into this problem. I had just redownloaded Code::Blocks, so I thought it would have a decently recent MinGW version.

MartinBo

  • Newbie
  • *
  • Posts: 1
    • View Profile
libgcc_s_dw2-1.dll missing error
« Reply #12 on: October 26, 2011, 03:36:34 pm »
Hi, I'm also getting this libgcc_s_dw2-1.dll missing error and it pops up for no reason. Now I googled and downloaded this dll from several places and tried to replace it, but problem isn't solved. After googling about dll missing errors, I found at Micorsoft (http://support.microsoft.com/kb/188213) and in another support page that in this situation the problem is with Windows. From some reason the path of libgcc_s_dw2-1.dll at Windows is missing or wrong, so windows can't find it and that is the reason for the error - can anyone tell where windows keeps the 'path' to that libgcc_s_dw2-1.dll?

Laurent

  • Administrator
  • Hero Member
  • *****
  • Posts: 32504
    • View Profile
    • SFML's website
    • Email
libgcc_s_dw2-1.dll missing error
« Reply #13 on: October 26, 2011, 03:45:44 pm »
This DLL is in your installation of MinGW. so you have two solutions:
- copy it in the same directory as any executable that requires it
- put your <mingw/bin> path into the PATH environment variable of Windows

A third option is to link statically to the corresponding library ("-static-libgcc" in linker options) so that the DLL is not required anymore.
Laurent Gomila - SFML developer

Haikarainen

  • Guest
libgcc_s_dw2-1.dll missing error
« Reply #14 on: October 27, 2011, 08:19:55 am »
This problem have bugged me a few times too. The steps that always makes it work;

1. Delete SFML, Recompile it with static libs (not only static sfml build), there should be a cmakeoption for this as default.
2. Delete the obj folder of your project (and all cached files), clean the project in your IDE, add the -static-libgcc linker option and then REBUILD the project.