Mingw horror stories from the darkside and beyond...

A place for Ogre users to discuss non-Ogre subjects with friends from the community.
Post Reply
frostbyte
Orc Shaman
Posts: 737
Joined: Fri May 31, 2013 2:28 am
x 14

Mingw horror stories from the darkside and beyond...

Post by frostbyte » Mon Nov 03, 2014 10:02 pm

The purpose of this thread is to Dissuade and Discourage good innocent orge users from using mingw and its associated pitfalls
as we( community ) tackle on daily bases forum messages about mingw lack of support, related bugs etc....
we get tired of working as visual studio "missionaries" ( we're not!!! )
so i figured - it would be nice to have one forum thread - discouraging people from going that path...
you can share you're experience and get our unlimited, uncondiitional sympathy and empathy...
hopefully, this process will free you from past pains allowing you to move on with your life...

so here it begins...

Warning using mingw may cause sever headache, depression, drug/alcohol addiction( worsen it in case you're already addicted ) , uncontrolled Computer rage attacks, extreme mood swings, Delusion of greatness, Sleep deprivation... ... ...
but mainly it is a waste of time...( unless you have a realy realy good reason )
0 x
the woods are lovely dark and deep
but i have promises to keep
and miles to code before i sleep
and miles to code before i sleep..

coolest videos link( two minutes paper )...
https://www.youtube.com/user/keeroyz/videos

TheSHEEEP
OGRE Retired Team Member
OGRE Retired Team Member
Posts: 972
Joined: Mon Jun 02, 2008 6:52 pm
Location: Berlin

Re: Mingw horror stories from the darkside and beyond...

Post by TheSHEEEP » Thu Nov 06, 2014 7:37 pm

Speaking for myself here but I can only wholeheartedly discourage anyone from listening to the OP on this matter.

We (as in our own little company) are working with MinGW since years and have had no problems yet.
Not sure what yours is.

The resulting binaries (at least in our case) are neither slower nor faster.
The compiler syntax is much more comfortable as you need only one across all platforms. No need to waste time trying to figure out how to "translate" compiler and linker flags.
Your code will run across all platforms without any changes (MinGW is, partly, even more agressive in its adherence to official standards than "normal" GNU). The fact that MSVC usually compiles with less warnings, errors, etc. is not that it is better. It just willingly ignores many rules of the C++ standard. If that makes you feel better, alright. But be advised that this makes code go boom if brought onto other platforms.
You do not need another layer on top of your software cake for compiler management, like CMake. We have one NetBeans project that works across all our target platforms. That can also be done with QtCreator, etc.
You do not rely on Microsoft products (heck, even Windows can be skipped but that makes testing pretty hard). Believe it or not, but not relying on purely profit-driven companies makes us and many others feel much, much better.
If you write code that is actually cross-platform code, and use libraries that are actually cross-platform libraries, you will not have any problems. Use stuff that only works on Windows, then port to another platform and you will land in the hell you asked for. You will get problems, but that is not the fault of MinGW, it is the result of not writing proper cross-platform code in the first place.

Just as an example for that last point, I was working on porting a library to MinGW that was obviously written for Windows first. The mere fact that I had to "port" it with A LOT OF effort shows that the original developers were coding with the typical MS mindset. "I don't care about anything but this very machine." Then some customer with a proper hatred for MS wanted a MinGW version and I was asked to help. It took me two months (that lib was pretty big) as I had to replace some libraries and a lot of code that would never work on any platform except Windows (as it was just not conforming to any official standards).
Had the developer taken just a bit more time to setup a proper cross platform pipeline, all of this work could have been spent on something useful.
Btw. said developer was, at the same time, porting his lib onto OSX and basically told me all of that above paragraph while doing so. Called himself short-sighted, and I can only agree.

Of course, if you develop software only for Windows (why would anyone do that when not forced to?), the list gets much smaller. MinGW's biggest plus is that it makes cross-platform development so much easier. You can develop on Linux most of the time (which is like 20-50% faster than Windows by default), and just move to Windows from time to time for upgrading libs and testing. I am SO MUCH MORE productive when working on Linux doing exactly the same things I do on Windows, I loathe that I have to use Windows so often for many games.

Many people come into contact with MinGW first via Code::Blocks.
THAT thing is hell and usually comes with an outdated MinGW version. Also, it is just a plain bad IDE when compared with almost any other. When I first started to code, I was using CodeBlocks. And hated it. I then moved to VS and it was okay. After some years, I had a look at NetBeans and QtCreator and never looked back. Oh, how I wish that someone would have told me about them earlier.
We prefer NetBeans by now, but I know some people also like to work with Eclipse or QtCreator or KDevelop or.... you get the idea. No need for Visual "I am so slow and Intellisense constantly collapses. Please BUY Visual Assist to make me useful. Also, please give me all your data. Register here. Kthxbye" Studio.

There is no DirectX11 with MinGW. But who cares? OpenGL can do anything just as well. Maybe except the most bleeding edge techs, but at least for games, nobody should implement those as nobody will be able to use those ;). Plus, you have graphics code that will instantly work on other platforms as well. With only minor adjustments required for mobile (if anyone honestly wants to argue Windows Phone).

Developing "the MS way" educates people in a way that makes them expect that everything just needs to be downloaded and plugged in (aka linked against) and magically works. I have talked to people that have been programming for longer than I do and do you think they were able to tell me how a compiler and linker works? Nope. "You just have to type this here in the linker settings, then it works..." is the kind of answer I got from SOME of them. When a problem arose from some incompatibility in prebuilt downloaded binaries, was it them who could solve it? No, it was the guy who knew some typical pitfalls of DLL hell.
I swear, MS tries to make your life so easy, it will actively make you learn much less if you don't watch out.
0 x
My site! - Have a look :)
Also on Twitter - extra fluffy

User avatar
c6burns
Beholder
Posts: 1511
Joined: Fri Feb 22, 2013 4:44 am
Location: Deep behind enemy lines

Re: Mingw horror stories from the darkside and beyond...

Post by c6burns » Thu Nov 06, 2014 8:12 pm

I don't know this first hand, but there appear to be some issues working with DirectX in Windows 8.1. Yes mingw cannot work with DX11, but also now that DX has seemingly been rolled into the Windows SDK in 8.1 there are some issues on that platform. Having worked for so long with GNU C myself, I don't doubt it is a solid compiler. I just prefer to stick with visual studio. For example, can I build a metro app with mingw? Are there complications? These are things I don't want to become an expert on, but that is certainly just my own opinion :) I prefer writing code that compiles in native gcc and msvc w/ a cross platform build system ... I totally feel your pain over porting!
0 x

TheSHEEEP
OGRE Retired Team Member
OGRE Retired Team Member
Posts: 972
Joined: Mon Jun 02, 2008 6:52 pm
Location: Berlin

Re: Mingw horror stories from the darkside and beyond...

Post by TheSHEEEP » Thu Nov 06, 2014 8:22 pm

c6burns wrote:For example, can I build a metro app with mingw?!
A metro app is just an app that runs on the Windows touch surfaces as well as normal desktop, using some special Windows API, right?
In that case, the whole pipeline would be in MS hands, and the answer is probably no. Or it would be so complicated that even I would suggest using MSVC.

I am no expert on that, either. The first thing I installed on my Win8 machine was Classic Shell. No Star Trek interface for me, thank you :D
Actually, it was second. The first thing I installed was Firefox, but nvm. ;)

But also, in that case I would rather ask if you cannot use Qt, wxWidgets or one of the other GUI toolkits that are cross-platform to begin with.
c6burns wrote:I prefer writing code that compiles in native gcc and msvc w/ a cross platform build system ...
That reminds me.
You can also use MSVC with NetBeans (and Eclipse I think, probably others, too). So you could still skip that build system layer if you wanted, and keep MSVC.
Those systems like CMake have their use. And try to remember how Ogre was without it...LOL!
But if you are developing just for yourself/your team, I think that agreeing on a single cross platform IDE can save you much time. Also saves the trouble of constantly switching between different IDEs with different behaviours.
0 x
My site! - Have a look :)
Also on Twitter - extra fluffy

User avatar
c6burns
Beholder
Posts: 1511
Joined: Fri Feb 22, 2013 4:44 am
Location: Deep behind enemy lines

Re: Mingw horror stories from the darkside and beyond...

Post by c6burns » Thu Nov 06, 2014 8:54 pm

TheSHEEEP wrote:
c6burns wrote:For example, can I build a metro app with mingw?!
A metro app is just an app that runs on the Windows touch surfaces as well as normal desktop, using some special Windows API, right?
In that case, the whole pipeline would be in MS hands, and the answer is probably no.

I am no expert on that, either. The first thing I installed on my Win8 machine was Classic Shell. No Star Trek interface for me, thank you :D
Actually, it was second. The first thing I installed was Firefox, but nvm. ;)

But also, in that case I would rather ask if you cannot use Qt, wxWidgets or one of the other GUI toolkits that are cross-platform to begin with.
My guess is also no to mingw metro, not that it's a deal breaker for most people anyway. Star Trek interface :lol: yeah I haven't enjoyed my limited experiences with Win8 (using wife's laptop)

Don't get me wrong, if MS burned down in a massive fire vortex I wouldn't be losing much sleep. My life would suddenly get much simpler! After all my day job for the last decade is linux sysadmin and telephony programming (mainly in GNU C). I don't hate microsoft though there was I time I really really did ... I seem to have gotten over it somehow. I just see msvc as the path of least resistance for myself and I've had mainly positive experiences with Visual Studio. I use CMake on all my dependencies and generate projects to build out for win/lin/mac/android/ios. I might add Win8/RT to that list.
0 x

frostbyte
Orc Shaman
Posts: 737
Joined: Fri May 31, 2013 2:28 am
x 14

Re: Mingw horror stories from the darkside and beyond...

Post by frostbyte » Fri Nov 07, 2014 12:16 am

well, i actualy feel a bit regret of starting this thread since i realy used mingw a lot...and it served me very well...
i realy dont like visual-studio or ms agressive tactics of forcing you to use their products...
however they seem to have managed to do just that and on massive scales...
Just as an example for that last point, I was working on porting a library to MinGW that was obviously written for Windows first. The mere fact that I had to "port" it with A LOT OF effort shows that the original developers were coding with the typical MS mindset
this happens a-lot i can't fight it(( fighting ms is like fighting windmills ) i can just accept it as a fact...
Had the developer taken just a bit more time to setup a proper cross platform pipeline, all of this work could have been spent on something useful.
the problem is that they mostly dont - hence this thread started...
I am SO MUCH MORE productive when working on Linux doing exactly the same things I do on Windows
that not using mingw... it's using gcc in its natural home...
this is also my recommendation to mingw users...
for a flawless development cycle with gcc and it cross-platform abilities just move to linux...
"I am so slow and Intellisense constantly collapses. Please BUY Visual Assist to make me useful. Also, please give me all your data. Register here. Kthxbye" Studio.
so true... :lol: somtimes it feels more like a spyware virus then a parser...( eclipse can scan your whole computer with the time it takes Intellisense to finish his job... )
Developing "the MS way" educates people in a way that makes them expect that everything just needs to be downloaded and plugged in (aka linked against) and magically works.
i wish it was true...this is how it should be...
btw - with linux and its neat package-managers...case is even "worse"...
I prefer writing code that compiles in native gcc and msvc w/ a cross platform build system ... I totally feel your pain over porting!
vs
You can develop on Linux most of the time (which is like 20-50% faster than Windows by default), and just move to Windows from time to time for upgrading libs and testing
this is an exceptional way of doing stuff, i tried that but...lack of community support and small amount of info on the web, scared me away...
at the end of the day - you want your game to run realy good on windows( 90% of users ) - and if it's portable to mac and linux it's nice and nothing more...( never heard of a mac/linux oriented game )
so i believe that even if your targeting cross platform - what u realy want is windows app that can run on other platforms( knowingly or not... )
thats why i prefer c6burns approach - develop on windows( writing cross-platform code ) with msvc and with a relativly painless development flow
and when done - port it to other platforms using a cross platform build system...
writing premake scripts is so much faster then moving between linux and windows upgrading and testing...
You can also use MSVC with NetBeans (and Eclipse I think, probably others, too). So you could still skip that build system layer if you wanted, and keep MSVC.
tried that for a while - i dont recommend it - no precompiled header support - no cmake/premake support - no debugger - no lots of other small tweaks...
any way it is not cross platform and you cant convert this projects to mingw so i don't see any reason to do that...
the only thing that u can get from it, is that u can edit in netbean/eclipse and compile on visual-studio( which is how i work from time to time )

btw: you can also go the other way around( cross compile/gcc from visual-studio ) but my guess is that this approach suffers from the same symptoms...( lack of features/community/support )
Don't get me wrong, if MS burned down in a massive fire vortex I wouldn't be losing much sleep. My life would suddenly get much simpler
+1 :wink:
0 x
the woods are lovely dark and deep
but i have promises to keep
and miles to code before i sleep
and miles to code before i sleep..

coolest videos link( two minutes paper )...
https://www.youtube.com/user/keeroyz/videos

TheSHEEEP
OGRE Retired Team Member
OGRE Retired Team Member
Posts: 972
Joined: Mon Jun 02, 2008 6:52 pm
Location: Berlin

Re: Mingw horror stories from the darkside and beyond...

Post by TheSHEEEP » Fri Nov 07, 2014 9:18 am

frostbyte wrote:
You can also use MSVC with NetBeans (and Eclipse I think, probably others, too). So you could still skip that build system layer if you wanted, and keep MSVC.
tried that for a while - i dont recommend it - no precompiled header support - no cmake/premake support - no debugger - no lots of other small tweaks...:
Huh?
You mean if using MSVC with NetBeans you lose all of that? Are you sure?
I haven't tried it, but all these things are available when you use MinGW (precompiled headers are harder, but that is a general GCC thing), so it would at least be weird if that wasn't the case for MSVC.

NetBeans has CMake support btw. You can just import a CMake script to use as your project, similar to QtCreator. Though I do not know how working like that is. I can't imagine it being as easy as just using the "native" NetBeans project structure.
0 x
My site! - Have a look :)
Also on Twitter - extra fluffy

User avatar
Zonder
Ogre Magi
Posts: 1133
Joined: Mon Aug 04, 2008 7:51 pm
Location: Manchester - England
x 22

Re: Mingw horror stories from the darkside and beyond...

Post by Zonder » Fri Nov 07, 2014 11:20 am

TheSHEEEP wrote: Actually, it was second. The first thing I installed was Firefox, but nvm. ;)
First app I always install as well :lol:
0 x
There are 10 types of people in the world: Those who understand binary, and those who don't...

frostbyte
Orc Shaman
Posts: 737
Joined: Fri May 31, 2013 2:28 am
x 14

Re: Mingw horror stories from the darkside and beyond...

Post by frostbyte » Fri Nov 07, 2014 3:03 pm

You mean if using MSVC with NetBeans you lose all of that? Are you sure?
i'm 100% sure for eclipse msvc-cdt toolchain...and afaik netbeans-msvc toolchain has the same problems...
eclipse-msvc project has its own build script style( different from mingw ) which cmake/premake knows nothing about...
problem is that cmake/premake don't know how to mix msvc compiler with netbeans/eclipse project build scripts...

working directly with an imported cmake project sounds like somthing i wouldn't want to try...
maybe the fact that netbeans is using ant - make it somehow easier with netbeans-msvc support...( find it hard to believe )
didnt try netbeans c++ ( lately )
i used it in earlier version and moved to eclipse due to parser problems( was even worse the intellisense )
netbeans came a long way since...netbeans 8.0 should be code named neatBeans...
0 x
the woods are lovely dark and deep
but i have promises to keep
and miles to code before i sleep
and miles to code before i sleep..

coolest videos link( two minutes paper )...
https://www.youtube.com/user/keeroyz/videos

frostbyte
Orc Shaman
Posts: 737
Joined: Fri May 31, 2013 2:28 am
x 14

Re: Mingw horror stories from the darkside and beyond...

Post by frostbyte » Fri Mar 10, 2017 2:45 pm

Dear mr MingW
i would like to apologize for slandering your good name
you are a cool compiler...maybe even the BEST windows compiler!!!

yesterday i had to compile a c++14 project...i only have VS2010 targeting SDK7.1a...
VS2015/2013 was out of the question, because i don't have free 12GB and because i don't want to spend 3 days installing...
VS2017rc installer is a great improvement= downloading offline, you can get desktop c++ targeting xp for "only" ~3-4GB
but...but...i was scared to mess with the .net runtimes( i once tried installing 2012/2010 side by side and it screwed my system... ) , this could result in 3 days of trying to reinstall VS2010, vs2017rc also expires in two month...

so i went back to my old-friend MingW64
the complete mingw-build disro including pthreads( a must for std::future and std:async ) was about 87MB!!! when uncompressed only ~460MB, installation...just unzip it and add "/mingw64/bin" to windows path...done!!!
no messy registry keys/no fraking .netV??? runtime clashing etc...
now i needed Boost...oh no...i hate compiling boost....whats that mumble i keep hearing, people whispering about new magical tool called msys2...https://sourceforge.net/projects/msys2/ ... GW/x86_64/
OMG they even have ogre2.1 binaries!!!
downloaded and unpacked boost(only 18mb)....the c++14 library, compiled perfectly and all is well :)
i also found out that eclipse cdt made a huge leap, i think its now the fastest parser on the planet..
lots of bugs were fixed...its a real joy to work with...me recommend...eclipse CDT....

so in conclusion, i thank you very much dear mr MingW, and from now on i will only say good things on your behalf 8)
wish you the best, yours trolly, frostbyte.
0 x
the woods are lovely dark and deep
but i have promises to keep
and miles to code before i sleep
and miles to code before i sleep..

coolest videos link( two minutes paper )...
https://www.youtube.com/user/keeroyz/videos

Post Reply