SFML community forums
Help => General => Topic started by: Raisapius 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 (http://www.sfml-dev.org/forum/viewtopic.php?t=2812) 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)?
-
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
-
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++.
||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
-
i have the same problem.. can anyone help?
and why i get this:
||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 ===|
-
Did you define SFML_DYNAMIC?
-
Did you define SFML_DYNAMIC?
yes (http://i55.tinypic.com/9ggin5.png)
-
You wrote SFML_DINAMIC :lol:
-
ouuu.. :oops: :lol:
but question how to statically link libgcc_s_dw2-1.dll is still active :?
-
-static-libgcc in linker options.
-
-static-libgcc in linker options.
it doesnt work
i hope this time there isn't spell mistakes (http://i56.tinypic.com/xeg29w.png) :lol:
-
This works for me. If it doesn't for you, try Google to find relevant information.
-
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.