Which version of MinGW to install?

Monkey Forums/Monkey Programming/Which version of MinGW to install?

ziggy(Posted 2013) [#1]
If I install the one provided here: http://tdm-gcc.tdragon.net/download Whenever I run a c++_tool build from outside the IDE, I get this:
"the program could not start becouse of libgcc_s_dw2-1.dll missing on the computer. Please reinstall the program to solve this problem" (translated from Spanish).
Shouldn't the c++_tool builds generate a Standalone executable? Should I install a very speciffic version of MinGW to prevent this?


dawlane(Posted 2013) [#2]
Have you had a look on stack over flow? http://stackoverflow.com/questions/4702732/the-program-cant-start-because-libgcc-s-dw2-1-dll-is-missing
Static linking should solve it.


AdamRedwoods(Posted 2013) [#3]
-static-libgcc -static-libstdc++

look for this somewhere, and if not, the c++ tool can also use the new CC_OPTS="-static-libgcc"


ziggy(Posted 2013) [#4]
Thanks AdamRedwoods, I think I've got it right now


marksibly(Posted 2013) [#5]
Weirdly, this isn't happening here, gcc version 4.8.1 (tdm-1)

What's the size of a 'hello world' output binary file,eg:

Function Main()
	Print "Hello World!"
End


This produces a main_winnt.exe of 334K here (debug mode). If you're dynamically linking with stdc++ libs, it should be smaller...


ziggy(Posted 2013) [#6]
Unfortunatelly, not sure how to make it fail again. I've removed an older version of MinGW, and ensured the Path environment was properly set and I'm not getting the issue any more. *Maybe* there was a MinGW system path pointing the the older version causing issues... ?

If I get a way to replicate this, I'll give more feedback, but seems that installing from scratch and removing previous installs did somehow solve it.


kmac(Posted 2013) [#7]
Note that the web-installer for TDM offers the option to download the DW2 or SJLJ compiler.

I have also found that the official distribution of 4.8.1 is more robust with respect to those errors. As well, in my notes for a library that I'm using I have the following comment.

--- It appears that without linking -static-libgcc & -static-libstdc++ one is exposed to a bizarre error. If running from the command line (i.e., typing the name of the application) then the application will launch. Double-clicking on the application from Windows Explorer could result in the following error,

"The program can't start because libgcc_s_dw2-1.dll is missing from your computer. Try reinstalling the program to fix this problem."

Edit: I take that back. The official GCC 4.8.1 is mostly well behaved. I find myself switching between TDM, official distribution, and http://www.josuegomes.com/mingw.php.


DarkyCrystal(Posted 2013) [#8]
Hi,

I had the same problem, but I find the solution. In fact, in the config.winnt.txt file, you have a link to download the correct version of MinGW and use it.

Here it is : http://tdm-gcc.tdragon.net/download

I installed this version and all is ok now.

Have fun !