If I run it native Code::Blocks, it works correctly; however if I operation it by doubleclicking ~ above the executable file, a window pops up through this message:

The regime can"t start since libgcc_s_dw2-1.dll is missing from her computer. Shot reinstalling the regimen to fix this problem.

You are watching: Libgcc_s_dw2 1 dll

So, what is the problem? What perform I need to do to deal with it?


*

*

I believe this is a MinGW/gcc compiler issue, quite than a Microsoft intuitive Studio setup.

The libgcc_s_dw2-1.dll have to be in the compiler"s bin directory. Friend can add this brochure to her PATH setting variable because that runtime linking, or you can avoid the trouble by including "-static-libgcc -static-libstdc++" to her compiler flags.

If you setup to distribution the executable, the last probably provides the most sense. If friend only plan to operation it ~ above your very own machine, the changing the PATH setting variable is an attractive alternative (keeps under the size of the executable).

Updated:

Based on feedback native Greg Treleaven (see comments below), I"m adding links to:

The latter discussion includes -static-libgcc and also -static-libstdc++ linker options.


re-publishing
follow
edited Feb 7 "11 at 14:38
answered january 16 "11 at 0:38
*

hardmathhardmath
8,49322 yellow badges3232 silver badges6161 bronze badges
16
| display 11 much more comments
36
In Eclipse, you will find it under the project properties > C/C++ construct > settings > MinGW C++ Linker > Misc

You must add it to the "linker flags" in ~ the top; i do not have anything else.Then just rebuild.

*

I have discovered that linking those statically explodes the size up come 1,400kb also with optimizations. It"s 277kb larger compared to simply copying over the shared DLLs. It"s 388kb larger as well after UPXing everything. Very lose/lose here. Just encompass the DLLs together the end-user can decide to delete lock or not if they have them mounted elsewhere.


share
follow
edited Jul 24 "14 in ~ 10:24
*

vbo
13.4k11 gold badge2323 silver- badges3333 bronze title
answer Dec 22 "11 at 8:52
*

TommyTomTommyTom
36933 silver badges22 bronze title
2
add a comment |
13
Code::Blocks: add "-static" in settings->compiler->Linker settings->Other linker options.


share
follow
answered jan 20 "13 in ~ 17:10
user1826947user1826947
13111 silver- badge22 bronze badges
4
add a comment |
7
See also. It addressed my problem.

By the way, is it certainly compiler flag? perhaps linker is the much more suitable hatchet here?


re-superstructure
monitor
edited Jul 22 "17 at 19:54
datatype_void
43355 silver- badges2222 bronze badges
answer Nov 24 "11 at 13:21
fatfat
5,27844 yellow badges3838 silver badges6262 bronze badges
1
add a comment |
6
Find the dll on her PC, and copy it into the same brochure your executable is in.


re-superstructure
monitor
answered january 15 "11 at 23:21
DaveDave
3,3981818 silver- badges1313 bronze badges
2
include a comment |
5
Copy "libgcc_s_dw2-1.dll" to to be make.exe is. (If you room using Msys, copy it to \msys\bin)Make sure that the path to make.exe is collection in the env. Path (if make.exe is in a folder "bin", many likely, and you have actually msys, it"s \msys\bin)Compile, rund, debug, etc. Happy.


re-superstructure
follow
reply Oct 7 "11 at 23:08
BlizzBlizz
5111 silver badge11 bronze argorial
add a comment |
5
Go come the MinGW http sourceforge.net tree. Under Home/MinGW/Base/gcc/Version4(or everything version use space using)/gcc-4(version)/ you"ll discover a record like gcc-core-4.8.1-4-mingw32-dll.tar.lzma. Extract it and go right into the bin folder wherein you"ll find your libgcc_s_dw2-1.dll and also other dll"s. Copy and also paste what you need right into your bin directory.


re-superstructure
monitor
reply Feb 24 "15 at 22:03
user2074102user2074102
include a comment |
5
I to be able to get rid of this by using "gcc" instead of "g++" for my compiler. I recognize this isn"t an choice for many people, however thought I"d point out it together a workaround alternative :)


re-publishing
monitor
edited might 29 "18 in ~ 15:58
answered Jun 24 "15 in ~ 21:14
rogerdpackrogerdpack
52.7k3131 yellow badges223223 silver badges342342 bronze title
include a comment |
4
Can"t you put it in system32 or something like you execute with others dll files, so that every regime you shot to run won"t have actually that difficulty on her machine?

I simply need the path where to put it.

It is kinda stroked nerves to placed it in the brochure every time I run a regimen I just built...

Edit: I uncovered the solution:

Extract libgcc_s_dw2-1.dll come a location on her computer. Us recommend you come unzip it to the brochure of the program that is requesting libgcc_s_dw2-1.dll.

See more: George Costanza We Live In A Society ' Memes, George Costanza Quote

If the doesn"t work, friend will have to extract libgcc_s_dw2-1.dll to your device directory. By default, this is:

C:\Windows\System (Windows 95/98/Me) C:\WINNT\System32 (Windows NT/2000) C:\Windows\System32 (Windows XP, Vista, 7)

If you usage a 64-bit variation of Windows, friend should also place libgcc_s_dw2-1.dll in C:\Windows\SysWOW64\

Make sure overwrite any type of existing files (but do a back-up copy that the original file). Reboot your computer.

If the trouble still occurs, try the following:

open Windows begin menu and also select "Run...". Type CMD and press go into (or if you usage Windows ME, form COMMAND)). Kind regsvr32 libgcc_s_dw2-1.dll and press Enter.