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

Author Topic: Code::Blocks on Win7 - libgcc_s_dw2.dll not found.  (Read 7058 times)

0 Members and 1 Guest are viewing this topic.

Raisapius

  • Newbie
  • *
  • Posts: 1
    • View Profile
Code::Blocks on Win7 - libgcc_s_dw2.dll not found.
« on: September 29, 2010, 09:43:35 am »
Whenever I try to run my application from Code::Blocks itself (Run button), it works fine. But whenever I attempt to run it from the folder it's in, I am told that libgcc_s_dw2.dll could not be found.

I'm using gcc 4.4, the one linked from the installation page.

I have read this this thread already. Linking statically with -static-libgcc does nothing. I did read that SFML uses the Dwarf2 version of gcc, but apparently the one linked from the installation page is the SJLJ version.

Is there anything I can do, or will I have to just find and place the DLL in the folder (which doesn't seem like a good idea to me)?

Spellbreaker

  • Newbie
  • *
  • Posts: 33
    • ICQ Messenger - 287156171
    • MSN Messenger - spellbreaker@live.de
    • Yahoo Instant Messenger - Spellbreaker1979
    • View Profile
    • http://www.apeironstudios.com
Code::Blocks on Win7 - libgcc_s_dw2.dll not found.
« Reply #1 on: September 30, 2010, 12:39:32 pm »
First, you should compile static sfml libs yourself with the compiler you will use for compiling your app.

Second try adding -static-libstdc++ to the linker options.


Greets

RickyDev

  • Newbie
  • *
  • Posts: 1
    • View Profile
    • Email
Code::Blocks on Win7 - libgcc_s_dw2.dll not found.
« Reply #2 on: October 17, 2010, 04:25:51 am »
Quote from: "Spellbreaker"
First, you should compile static sfml libs yourself with the compiler you will use for compiling your app.

Second try adding -static-libstdc++ to the linker options.


Greets

I have this same problem, if I only link with -static-libgcc it does nothing
it has to also be linked with -static-libstdc++ to get rid of both DLL dependencies from libgcc_s_dw2-1.dll and libstdc++-6.dll but it makes
the size of the executable increase exponentially,
So my question is. Can I get rid of libgcc_s_dw2-1.dll with out getting rid of libstdc++-6.dll?

Well I sorta can if I link with -static-libgcc alone it adds about 10KB to my executable but it doesn't get rid of the libgcc_s_dw2-1.dll dependency(or the libstdc++-6.dll but w.e).
And code block gives me a weird warning when I only link static with libgcc and not both libgcc and libstdc++.
Quote
||warning: auto-importing has been activated without --enable-auto-import specified on the command line.|
||Info: resolving std::cout  by linking to __imp___ZSt4cout |
||=== Build finished: 0 errors, 1 warnings ===|


I don't think it has anything to do with SFML libs though

I'm using C::B 10.05 and GCC  4.5

purkskis

  • Newbie
  • *
  • Posts: 22
    • View Profile
Code::Blocks on Win7 - libgcc_s_dw2.dll not found.
« Reply #3 on: December 23, 2010, 06:58:44 pm »
i have the same problem.. can anyone help?

and why i get this:
Quote

||warning: auto-importing has been activated without --enable-auto-import specified on the command line.|
||Info: resolving vtable for sf::Sprite by linking to __imp___ZTVN2sf6SpriteE |
||Info: resolving sf::Color::Black     by linking to __imp___ZN2sf5Color5BlackE |
||=== Build finished: 0 errors, 1 warnings ===|

Laurent

  • Administrator
  • Hero Member
  • *****
  • Posts: 32504
    • View Profile
    • SFML's website
    • Email
Code::Blocks on Win7 - libgcc_s_dw2.dll not found.
« Reply #4 on: December 23, 2010, 09:29:46 pm »
Did you define SFML_DYNAMIC?
Laurent Gomila - SFML developer

purkskis

  • Newbie
  • *
  • Posts: 22
    • View Profile
Code::Blocks on Win7 - libgcc_s_dw2.dll not found.
« Reply #5 on: December 23, 2010, 09:42:03 pm »
Quote from: "Laurent"
Did you define SFML_DYNAMIC?

yes

Laurent

  • Administrator
  • Hero Member
  • *****
  • Posts: 32504
    • View Profile
    • SFML's website
    • Email
Code::Blocks on Win7 - libgcc_s_dw2.dll not found.
« Reply #6 on: December 23, 2010, 09:53:02 pm »
You wrote SFML_DINAMIC :lol:
Laurent Gomila - SFML developer

purkskis

  • Newbie
  • *
  • Posts: 22
    • View Profile
Code::Blocks on Win7 - libgcc_s_dw2.dll not found.
« Reply #7 on: December 23, 2010, 09:59:53 pm »
ouuu..  :oops:   :lol:

but question  how to statically link libgcc_s_dw2-1.dll is still active  :?

Laurent

  • Administrator
  • Hero Member
  • *****
  • Posts: 32504
    • View Profile
    • SFML's website
    • Email
Code::Blocks on Win7 - libgcc_s_dw2.dll not found.
« Reply #8 on: December 23, 2010, 10:02:20 pm »
-static-libgcc in linker options.
Laurent Gomila - SFML developer

purkskis

  • Newbie
  • *
  • Posts: 22
    • View Profile
Code::Blocks on Win7 - libgcc_s_dw2.dll not found.
« Reply #9 on: December 23, 2010, 10:17:08 pm »
Quote from: "Laurent"
-static-libgcc in linker options.

it doesnt work
i hope this time there isn't spell mistakes  :lol:

Laurent

  • Administrator
  • Hero Member
  • *****
  • Posts: 32504
    • View Profile
    • SFML's website
    • Email
Code::Blocks on Win7 - libgcc_s_dw2.dll not found.
« Reply #10 on: December 23, 2010, 10:33:32 pm »
This works for me. If it doesn't for you, try Google to find relevant information.
Laurent Gomila - SFML developer

Silvah

  • Guest
Code::Blocks on Win7 - libgcc_s_dw2.dll not found.
« Reply #11 on: December 23, 2010, 10:40:21 pm »
It works, but not in the way OP wants it to - libgcc is linked statically with the program, but libstdc++ and probably other libraries as well are still linking with it dymamically. Thus, the dynamic one is still required.