When registered with our forums, feel free to send a "here I am" post here to differ human beings from SPAM bots.
If it works from inside C::B, but not from outside (explorer or commandline), it means, that the dll can not be found by the system, because it's neither in the search path, nor in the same folder as the exe.
Quote from: jens on August 15, 2012, 06:22:53 amIf it works from inside C::B, but not from outside (explorer or commandline), it means, that the dll can not be found by the system, because it's neither in the search path, nor in the same folder as the exe. yes as you said, it works inside the C::B. Even a simple demo "HELLO WORLD" can't exec outside the C::B. Do you have any idea how to fix it? Thanks!
[...] because it's neither in the search path, nor in the same folder as the exe.
The reason isQuote from: jens on August 15, 2012, 06:22:53 am[...] because it's neither in the search path, nor in the same folder as the exe.Easiest fix is to simply copy libgcc_s_dw2-1.dll (it should be located somewhere similar to C:\MinGW\bin or C:\Program Files\CodeBlocks\MinGW\bin) into the same folder as the .exe.Alternatively, add the following two switches to your linker options:-static-libgcc-static-libstdc++
Hi, Sorry to update the old thread, I'm a newbie, how can I add the switches to my linker options?thanks a lot.
Quote from: m.m.m on November 28, 2016, 05:44:51 pmHi, Sorry to update the old thread, I'm a newbie, how can I add the switches to my linker options?thanks a lot.Project -> Build OptionsSelect correct target or project in left hand paneTab: Linker SettingsBox: Other linker settingsEnter linker options one per line.Tim S.
Quote from: stahta01 on November 28, 2016, 08:16:43 pmQuote from: m.m.m on November 28, 2016, 05:44:51 pmHi, Sorry to update the old thread, I'm a newbie, how can I add the switches to my linker options?thanks a lot.Project -> Build OptionsSelect correct target or project in left hand paneTab: Linker SettingsBox: Other linker settingsEnter linker options one per line.Tim S.Thanks for the solution, I first had two errors, one for libstdc++6.dll and one for libgcc_s_dw2-1.dll, now the error for libstdc++6.dll has solved but the error for libgcc_s_dw2-1.dll still remains.
You need to add the right linker option for your compiler; I suggest reading about your compiler to find out the option you need to add; note, I know little to nothing about your compiler it might NOT have any option to fix your problem.Edit: http://wiki.codeblocks.org/index.php?title=FAQ-Compiling_%28general%29#Q:_How_do_I_report_a_compilation_problem_on_the_forums.3FTim S.
Quote from: stahta01 on November 29, 2016, 03:39:21 amYou need to add the right linker option for your compiler; I suggest reading about your compiler to find out the option you need to add; note, I know little to nothing about your compiler it might NOT have any option to fix your problem.Edit: http://wiki.codeblocks.org/index.php?title=FAQ-Compiling_%28general%29#Q:_How_do_I_report_a_compilation_problem_on_the_forums.3FTim S.My compiler is MinGW, running on code::blocks 16.01, how can I find the option I need to add?Thanks a lot
Quote from: m.m.m on November 29, 2016, 01:16:12 pmQuote from: stahta01 on November 29, 2016, 03:39:21 amYou need to add the right linker option for your compiler; I suggest reading about your compiler to find out the option you need to add; note, I know little to nothing about your compiler it might NOT have any option to fix your problem.Edit: http://wiki.codeblocks.org/index.php?title=FAQ-Compiling_%28general%29#Q:_How_do_I_report_a_compilation_problem_on_the_forums.3FTim S.My compiler is MinGW, running on code::blocks 16.01, how can I find the option I need to add?Thanks a lotStep 1: Is figuring out the group that built your compiler!Is it an TDM's built MinGW GCC?Is it an TDM's built MinGW64 GCC?Is it an SJLJ or DW2 built compiler? SJLJ=Set Jump Long Jump DW2 = Drawf2Yours is likely DW2; but, it is NOT certain.Step 2: Is getting the Compiler version info. Like 4.9.1 or ??Tim S.