Mingw & Codeblocks vs. Visual C++
Johan Halmén

A few times during my history as a hobby programmer, I've tried to switch from GCC/Mingw/Dev-C++/Codeblocks to Visual and after crying a little bit inside I've always turned back. By GCC/Mingw/Dev-C++/Codeblocks I mean a lose family of some fine free software, that always has made me feel comfortable. Their actual relationships with each other are unclear to me (like GCC vs. Mingw) and actually I don't even care to know. By Visual I mean everything like Visual Studio or Visual C++, and although that stuff can probably be used for free, it still is Micro$oft (last time, long ago, I remember the free version didn't include some important parts that I needed).

Right now I have a setup with Mingw/Codeblocks and Allegro 5. But it's on my job laptop, and we have a process going on that every employee gets their laptop reset and installed with new software. The laptop gets totally wiped out. Win7 gets replaced with Win10 (which is the main thing with the process) and a bunch of software gets installed. Among the software is Visual C++.

When I get my laptop back, I might install Allegro 5 with Visual C++ or I might just uninstall Visual C++ and reinstall Mingw/Codeblocks and Allegro 5. I'm talking about a school here, and the employees are teachers. A very few teach programming. I teach music. So, having Visual C++ on sixty teachers' computers, while three or four teach programming seems pretty stupid, and I don't think I'd need Visual C++ at all in my job.

I guess some of you use Visual C++ and some of you use Codeblocks or Dev-Cpp together with Mingw. I'd like to hear your comments, but only if you truly have experiences with both. Not comments like "I've always sticked to Mingw and I'm happy with it".

Edgar Reynaldo

When it comes down to it, MinGW and CodeBlocks are just way more user friendly than MSVC++. Menus are easier to navigate, settings are way friendlier, there is more compatibility between the compiler and the ide, the list goes on. There isn't a single version of visual studio that I have ever liked more than CodeBlocks. CB isn't bloated like MSVC. All I have to do to install a new version of CB is download and extract three files to a new directory. Let me see MSVC do that. :P

Johan Halmén

So you do know Visual. And still prefer Codeblocks and Mingw. Well, that probably is common.

LennyLen

I really liked VS 6. When I switched to MinGW as my compiler ca.2001, I used a clone called MinGW Developer Studio until C::B was released.

My reason for switching to MinGW was better cross-platform compatibility.

Neil Roy

I prefer Code::Blocks + MinGW for many reasons. Cross platform being one. The fact is, Visual is not free. It is free to use to a certain point, but when you read your agreement, it is not free if you create software that makes a lot of money. Not a problem for a lot of us, but there are strings attached and I don't like that. Another reason I stick to MinGW, and this is my MAIN one is that it supports the latest C standard. I prefer to code in C and you don't get the latest C standard with Visual Studio.

I focus on totally free software with no strings attached that are cross platform. I stick to cross platform libs and try and code with cross platform in mind. And as I said, it HAS to support the latest C standard or forget it.

I also find Code::Blocks less convoluted to use. I have been able to easily add in libraries, compile them etc... for use with Code::Blocks.

I see Microsoft is trying to get VS out on different platforms now, but that won't change my mind about it. I also don't like having to log on to my IDE and having it connect to the internet for anything but updates (and even that, I can do myself).

raynebc

Codeblocks is pretty intuitive, I was able to pick things up easily. I installed Visual Studio so I could poke around with the Xenia emulator source code and VS indeed seems extremely complicated by comparison.

Polybios

IDE-wise, I've personally found both Visual Studio and CodeBlocks (last Visual C++ version I've tested was something like 2008, though) lacking in comparison with QtCreator which is what I mostly use as an IDE today. That usually means I use CMake as a build system, too.
Compiler-wise, I have to admit I haven't really used MS C++ since C++ 11 came out, so I don't know anything about that apart from remembering that it had some weird non-standard behavior. I mostly do C++ stuff on Linux anyway. There, I've come to like clang as a compiler because its warning and error messages tend to be more readable and/or helpful.

Neil Roy
raynebc said:

Codeblocks is pretty intuitive, I was able to pick things up easily. I installed Visual Studio so I could poke around with the Xenia emulator source code and VS indeed seems extremely complicated by comparison.

Definitely! I recently compiled my own DLL for a library that only had a VS version of it using Code::Blocks. I had never actually done that before, but I figured, what the hell, it wouldn't hurt to try. And I was surprised at how easy it was. With very little effort I got it compiled and had my DLL ready to go the first time I tried to do it. That really impressed me.

To be fair to Visual Studio, I did like their debugging tools. If Code::Blocks ever got something like that, it would kill everything else out there I think. But I honestly, rarely need debugging, and when I do, it's usually minor and easily done on Code::Blocks. I also liked the dark colour scheme on Visual Studio and would love to see something similar for Code::Blocks.

LennyLen
Neil Roy said:

I also liked the dark colour scheme on Visual Studio and would love to see something similar for Code::Blocks.

Well, it is open source. ;)

relpatseht

Code::Blocks supports color schemes, best I recall. I used a dark scheme once. I even fixed the source to properly show text when using a dark scheme (some was hard-coded black). But, I've lost all those changes to HD failures. I really should have submitted them to the repo for review.

I can tell you it didn't take very long to do.

I pretty much exclusively use VS now though. The debugging tools are too valuable (although they've gotten worse since 2010).

Specter Phoenix

Okay I have to do it:

Blasphemy! No one shall denounce a tool offered to us from the MS gods! To do so is to throw away your life!

Joking aside, I have...[checking]...VS2k12, 2k13, and 2k15, but never touched them after installing them. Instead if I'm working on a purely C++ project where I'm just trying to get an understanding of a C++ feature I use Geany, if I am coding with SFML I used Code::Blocks. Not tried to build Allegro lately so I haven't used C::B with it recently.

Edgar Reynaldo

Not tried to build Allegro lately so I haven't used C::B with it recently.

CodeBlocks is an IDE. MinGW is the compiler. Please stop leading noobs astray.

By the way there are binaries for vanilla MinGW 5.3.0.3 and Allegro 5.2.2, so you really have no excuses not to use Allegro.

bjorn54

I tend to dual-build in both Visual Studio and also MingW/Codeblocks.

Of the two, I prefer Codeblocks IDE and MingW. I basically love the Codeblocks/MingW combination because they are natural together and I find Codeblocks to be a more comfortable IDE and I feel way more creative when I use it compared to VS.

A lot of programmers from my last library (HGE) were very pro-MSVC and sort of anti-mingW, that was part of how I got better at MSVC/VS. Still, I was able to build my mingW version of the DX9 update of the library with some modifications to the code.

Now for memory leak detection: I never did try to build Valgrind on Windows that I can remember, or if I did I was of course unsuccessful. On the other hand, I like the Visual Leak Detector for Visual Studio.

In terms of debugging, the version of MingW I was using had a bad debugger so I would just head over to VS to take care of SegFaults/Access to 0 addresses.

As for warnings, the warnings are different for both compilers, so that can help to tighten up the code in different ways too. Of course with MingW you can have the Scott Meyers warnings if you want.

In conclusion, I guess I prefer dual-build, but do like to spend most of my time in Codeblocks when I'm coding.

Specter Phoenix

CodeBlocks is an IDE. MinGW is the compiler. Please stop leading noobs astray.

Yes, I know. Yet I seldom see people differentiate the VS IDE and the compiler that it includes.

LennyLen

Yet I seldom see people differentiate the VS IDE and the compiler that it includes.

They are designed specifically to work with one another. C::B will recognize gcc, but gcc doesn't give a damn about C::B.

Specter Phoenix
LennyLen said:

They are designed specifically to work with one another. C::B will recognize gcc, but gcc doesn't give a damn about C::B.

One forcing you to use their compiler with their IDE and the other one allowing you to change what compiler you use magically removes the former from the IDE/Compiler argument?

LennyLen

One forcing you to use their compiler with their IDE and the other one allowing you to change what compiler you use magically removes the former from the IDE/Compiler argument?

I don't know what argument you are referring to, so I will not venture to answer the question.

I was merely stating WHY people don't bother to differentiate Microsoft's compiler from their IDE.

Neil Roy

I COMPILE with Code::Blocks, why? Because I don't boot up my command line and use GCC. Code::Blocks does it. And I used Code::Blocks, hence, I compile with Code::Blocks, and it calls whatever in hell I configure it for. :)

There is no way I am getting into specifics or I will have to name the linker, resource compiler etc. ;)

I didn't tell MinGW to compile my projects, I told Code::Blocks to. :)

Edgar Reynaldo

FFS Neil - CodeBlocks is not a COMPILER it is an IDE which tells your compiler what to do. Just because it knows how to use a compiler doesn't make it one. Are you a compiler? :-X

Specter Phoenix

There is what I mean. Why get anal about C::B being an IDE, but not VS being an IDE? Just because VS forces you to use CL?

Edgar Reynaldo

There is what I mean. Why get anal about C::B being an IDE, but not VS being an IDE? Just because VS forces you to use CL?

Yes, that's kind of the whole point of the conversation. Yes, MSVS is an IDE, I know that. That's what I'm telling you. It's an important distinction. It also is not a compiler, cl is. Want me to blow your mind? Android Studio is an IDE. It uses a compiler named Gradle. Eclipse is an IDE. It can use many compilers. C::B is an IDE, and it too can use multiple compilers and configurations, unlike MSVS which is an exceptional design feature failing on Microsoft's part.

if (semantically_equal(compiler.meaning() , ide.meaning())) {abort();}

These distinctions are IMPORTANT. It's like saying a banana is an orange. It makes no fucking sense. >:(

Chris Katko

If I'm using a full IDE / environment, it's gonna be Visual Studio. There's really no comparison. (Except it's a fat piece of crap that binds every possible keyboard press to something esoteric.) If something goes wrong, there's thousands of Google results for (almost) any potential problem.

Personally, when not doing GUI work (hobby work), I prefer to just use GCC/Clang with a simple bash script makefile called "go".

Neil Roy

Are you a compiler?

Yes, yes I am! :P

I was mostly kidding, I totally understand what an IDE is. Hence all my ;) in that post. How many times have you seen people saying they compile with Visual Studio? You better get anal about that too, as it does not compile, it is an IDE, so I'll be watching your posts from now on! ;)

But I do use Code::Blocks to compile. That is an accurate statement. I use it to compile, tell it what to compile and how I want it compiled, it then calls the compiler to do the work. :)

To me, Code::Blocks is the whole package of IDE, compiler, linker etc. It's rather useless by itself after all. ;)

Polybios

a compiler named Gradle

Not convinced. :P

Edgar Reynaldo

Okay, it's more of a build system like cmake or make, but it still compiles everything into an .apk file, which means it's a compiler.

Specter Phoenix

These distinctions are IMPORTANT.

I understand that, I'm referring to what I see on other forums.
On every forum I lurk on I see the same reaction:

"I compile with C::B."
Reaction: "AHHH!! C::B is an IDE! GCC/MinGW/ButtFuckEgypt are compilers! AHHHH!!!!"

"I compile with MSVC."
Reaction: crickets

The important distinction seems less important when people pick and chose where to stress the distinction.

raynebc

At least in the past, I get the impression that Visual Studio traditionally has always been associated with Microsoft's suite of compilers. Code::Blocks can be obtained bundled with MinGW in Windows, but you otherwise provide whatever compiler you want.

Neil Roy

I plan to say "I compile with Code::Blocks" from now on, just to bug people who stress over unimportant things. :P

In fact, time to add that to my sig! ;D

Edgar Reynaldo

>:(>:(>:(

If you compile with Code::Blocks, then Code::Blocks is a compiler. Feel free to uninstall mingw and use your IDE to compile away. ;)

Chris Katko

I really don't know why anyone cares at all about this terminology. It has zero impact on anything.

I had a terminology debate (on the implications of users) on "hidden" vs "Deleted". A coworker was saying that "He knows what delete this company means." Yeah, but we're not deleting the companies (which would affect historical business records attached to those companies). We're hiding them by adding a "is_hidden" column. Hidden vs deleted is a pretty big distinction.

Nobody is going "Use this compiler to build this code" and going "omg, should I download Visual Studio, or just Visual Studio's compiler?!" Everyone knows what you're talking about. Visual Studio is a brand. It means way more than just an IDE.

Edgar Reynaldo

I don't give a flying fig fruit whether or not someone says I compile with MSVC, because the compiler and the ide have been integrated since VS was created. It's a standalone monolithic program. Have you ever tried to install cl without msvc, or msvc without cl? Have fun with that. ;) However with Code::Blocks you have to separately install a compiler, whether it's bundled with CB or not. This clearly means Code::Blocks IS NOT A $#!@ING COMPILER! >:(

Specter Phoenix

So the distinction isn't important.

Edgar Reynaldo

What, are you brain dead? MSVC is a compiler AND an ide. C::B is NOT! Of course the distinction is important! Gaahhhh!

Chris Katko

Edgar: So to be clear, you're saying the distinction isn't important?

Edgar Reynaldo

omg, i give up :'(

Neil Roy

Sorry Edgar, but Visual Studio, according to your own standards is NOT the compiler. TO state that it is, and Code::Blocks is not when BOTH use a separate program to do the actual compiling is hypocritical.

I personally have never met ANYONE that uses Code::Blocks with anything other than MinGW, so to me, it's a moot point, no different than the integrated suite that is VS.

I DO understand what you mean, and technically you are correct, but I also feel that I can accurately state that "I compile with Code::Blocks" as I click on it to compile, what it uses under the hood and whether the two are integrated or separate units is a moot point to me. The actual dirty work is done by MinGW, but I don't use MinGW, I use Code::Blocks, IT USES MinGW. It IS important to understand what is doing the compiling for obvious reasons, but I don't see how it is important to stress over getting into a convoluted mess of IDE, compiler, linker etc... I call the whole lot "the compiler". I will go into those details you mention when it is important to say so. Otherwise, I don't wish to confuse newbies any more than I have to.

Anyhow... now you know how I feel in religious discussions when people don't grasp what I am trying to say. ;D

Specter Phoenix

Neil, your point was more eloquent than my remarks, but your post states much better than I did the point I was trying to get across.

LennyLen
Neil Roy said:

but I also feel that I can accurately state that "I compile with Code::Blocks" as I click on it to compile

A more accurate statement would be I compile using Code::Blocks.

Neil, your point was more eloquent than my remarks, but your post states much better than I did the point I was trying to get across.

Why is there a "but" in there?

Polybios

IIRC Code::Blocks uses its own build system, so no intermediate "make", is that right? It's been a long time I've last used it. I tend to run CMake from QtCreator, so I have a separate build tool (in fact, there are two of them, as CMake invokes make which is invoking the compiler) and a seperate IDE. Android-Studio invokes gradle, so it's the same there (no, gradle is not a compiler). Now, what about Visual-Studio's IDE? Does the IDE invoke the compiler directly? I think it does, doesn't it? So Visual Studio and CodeBlocks would have something in common that would set them apart from Android Studio. So how about that these are IDEs with integrated build tools, but not compilers? :P

Edgar Reynaldo

Sorry, I misspoke about Android. Gradle is the build system, like cmake. javac is the compiler.

Neil Roy said:

Sorry Edgar, but Visual Studio, according to your own standards is NOT the compiler.

I never said VS was a compiler. I said MSVC and cl are. VS is an IDE, and it can invoke many different compilers. Like CB, which is an IDE, not a compiler. VS and MSVC are not the same thing.

Try it the other way around. I dare you to call MinGW or CL an IDE.

Language is important. Clarity is important. Distinction is important.

Them's the bear facts folks!

{"name":"610915","src":"\/\/djungxnpq2nug.cloudfront.net\/image\/cache\/b\/3\/b378e8e3315dbbcc77f2d01ab02d1bec.png","w":324,"h":513,"tn":"\/\/djungxnpq2nug.cloudfront.net\/image\/cache\/b\/3\/b378e8e3315dbbcc77f2d01ab02d1bec"}610915

Neil Roy

Try it the other way around. I dare you to call MinGW or CL an IDE.

Language is important. Clarity is important. Distinction is important.

Flooding someone with information that simply is not needed, is not important, it is pointless. I compile using Code::Blocks. I don't use MinGW directly any more than someone uses Microsoft's compiler directly, but if I did, I would say I compile with it. Just like I compile using Code::Blocks! :)

Now if you need to know the dirty details of precisely what does the compiling, what does the linking etc... I will go into that. But otherwise, there's simply no need.

If you want to get technical, MinGW doesn't compile, it sends instructions to the CPU on what to do. Heck, lets get really technical and start talking about bits and high and low voltages that make them up?

Now I DO understand where you're coming from. I just do not see the need to constantly correct people with these sorts of details when it is not needed.

Edgar Reynaldo

VS is not a compiler. C::B is not a compiler. End of story. Like I said, feel free to uninstall MinGW and compile with C::B to your heart's extent. But you won't, because you can't, because C::B is not a compiler, and it is physically impossible to compile with Code::Blocks. Full stop. >:(

Polybios

Please start compiling, everyone. >:(

GullRaDriel

I'm all with Edgar on that. I'm tired of people not understanding they can compile all they want without an IDE.

Edgar Reynaldo

Thank you, Gully. ;)

GullRaDriel

You're welcome :-)

Specter Phoenix

I'm tired of people not understanding they can compile all they want without an IDE.

The current state of modern programming?

GullRaDriel

Yeah, also.

SilverTES

I use both, VS have more options but all are not absolutely necessary, CB is simpler and efficient.

CB is the good compromise, very light compared to VS.

The thing I don't like from VS is certains standard libraries behave weirdly. Otherwise, it's a really good IDE with really helpful tools.

CB is more straightforward and more clear for me. He don't add a lot of "extra" files when you create a project.

Neil Roy

I click compile in Code::Blocks, and it compiles. Full Stop. ;D

raynebc

Sometimes I don't even bother to use a compiler at all. I just use mingw32-make. Really streamlines the process.

LennyLen
Neil Roy said:

I click compile in Code::Blocks, and it compiles. Full Stop.

I bet you actually click build since C::B doesn't have a "compile" selection. :p

raynebc

There's a "Compile current file" function, so technically a single file project could be compiled in full using that function once.

Specter Phoenix

VS and MSVC are not the same thing.

I'm assuming this is referring to MSVC6.0 and not the modern standing. Otherwise this is confusing in terms of modern programming. According to what I've found online, MSVC is used to reference Visual C++, but Visual C++ is now just VS and CL. Finding that online made it so that it reads (to me) as "VS and VS are not the same thing."

Can someone elaborate on that?

m c

When it comes down to it, MSVC++ is just way more user friendly than MinGW and CodeBlocks are.

CodeBlocks is especially horribly. CodeBlocks is essentially shit, it has actual bugs where the IDE crashes, the document pane goes blank and the file cannot be opened unless you close the program, but it hangs on close. It's just trash. Codelite works better.

But even codelite is not as good as MSVC, double checking the underlying type of a variable isn't so easy, you can't just over over it and see the type name and the underlying typedef in a tooltip like you can in MSVC.

Usability of codeblocks, codelite, anjuta isn't THAT bad because they have tried to clone the menues and settings of MSVC, if you want to see a real cluster fuck look at old versions of xcode, or the watcom ide. They are basically spastic.

Chris Katko

Anyone tried Visual Studio Code? It's a modern open-source source code editor... that only has VS in the name. Looks a lot like Atom (which I haven't tried yet.)

https://code.visualstudio.com/

It runs Linux, Mac OS X and Windows. Also... I'm gonna say it again, it's open-source!

Very very space efficient. Supports terminal-like commands for doing stuff like typing a one-liner in to install an extension--of which EVERYTHING is a modular extension. Language support/debugger, themes, highlighting and intellisense, source control, everything.

It uses hotkey commands, as well as that terminal language, for everything. It's super simple yet somewhat daunting at first. There's so much "new" stuff in there that I'm probably going to have to sit and watch a 10 minute video to really understand the ebb-and-flow of it.

But it definitely feels like its from the future / where IDE's will eventually lead.

Contrast it with Visual Studio's WALL-OF-MENUS and EVERY KEY IS A HOTKEY mentality. Then again, at least Visual Studio is the one Microsoft product that hasn't become Metro'd or Ribbon'ified. God, Outlook, Excel, CRM, and half their products are a steaming pile of dog turd in terms of productivity.

Edgar Reynaldo
m c said:

When it comes down to it, MSVC++ is just way more user friendly than MinGW and CodeBlocks are.

I couldn't disagree more. VS is a complicated pile of obscure options. User friendly it is not. Just because you like the MSVC++ GUI designer doesn't make VS user friendly. MinGW integrates with CB so much more nicely than MSVC does with VS.

Neil Roy
LennyLen said:

I bet you actually click build since C::B doesn't have a "compile" selection. :p

I stand corrected. ;)

m c said:

CodeBlocks is especially horribly. CodeBlocks is essentially , it has actual bugs where the IDE crashes, the document pane goes blank and the file cannot be opened unless you close the program, but it hangs on close. It's just trash. Codelite works better.

Wow, been using it for years now and never experienced any problems with it. Never crashed, never went blank... nothing. Works like a charm and is fairly simple to use.

m c

well maybe you built a new one from source or something but I was referring to the current one in ubuntu 16.04 repos this week. The visual studio really lets you navigate around your code quickly, and have a lot of small windows open at once all side by side

code lite is good because when you build and there is an error it jumps to that source file and line without you having to click it so you can fix it, ctrl-shift-b, it builds and finds and jumps to the next, fix it, ctrl-shift-b, it builds and finds the next, fix it, etc.

LennyLen
m c said:

CodeBlocks is especially horribly. CodeBlocks is essentially shit, it has actual bugs where the IDE crashes, the document pane goes blank and the file cannot be opened unless you close the program, but it hangs on close. It's just trash.

I've also never experienced that. I do mostly use the Windows version though, so perhaps that is why. I have used the Ubuntu version a few times though over the years, also without any problems.

Neil Roy
m c said:

well maybe you built a new one from source or something but I was referring to the current one in ubuntu 16.04 repos this week. The visual studio really lets you navigate around your code quickly, and have a lot of small windows open at once all side by side

Nope, I download all mine pre-compiled only for Windows. So the problem is probably with the operating system you use. :)

Also, you're not using a stable release so don't be surprised when it crashes. How about using the stable release, 16.01?

Thread #616899. Printed from Allegro.cc