Recomendations for a c/c++ compiler for windows?
vanmunch
Posts: 568
Hey Everyone,
I didn't think that this would be too hard to do, but I am having a difficult time finding a c/c++ compiler for windows. It seams like there are a lot of them out their, but they look like they're half-baked. I don't mind spend some money for one (up to $100). What do you recommend? What are you using?
Thanks again for your time,
Dave
I didn't think that this would be too hard to do, but I am having a difficult time finding a c/c++ compiler for windows. It seams like there are a lot of them out their, but they look like they're half-baked. I don't mind spend some money for one (up to $100). What do you recommend? What are you using?
Thanks again for your time,
Dave
Comments
MinGW http://www.mingw.org/wiki/Getting_Started
Bloodshed http://www.bloodshed.net/devcpp.html
Visual C++ 2010 Express - free but requires .net http://www.visualstudio.com/downloads/download-visual-studio-vs
Visual Studio Express is quite good. The latest version is 2013 I think.
http://www.visualstudio.com/en-us/downloads/download-visual-studio-vs.aspx
Visual Studios looks good, but I'm trying to learn C and it looks like it only does C++? Also, do all of the programs that you write run through .net?
I just downloaded NetBeans and I'm going to see how it goes. Has anyone worked with it before?
Thank you again for your help!
Dave
MinGW is designed to be used by other development environments and is sometimes packaged (Bloodshed Dev-C++).
Netbeans, Eclipse, Bloodshed Dev-C++, and many others use mingw in the background. Not sure if NetBeans has an easy way to get MinGW (it's mostly a Java thing).
I don't recommend Cygwin. It is a horrible and miserably slow psuedo-linux variation.
I recommended VSC++ 2010 only because that was the last version I used. Any C++ dev platform will also compile C programs.
I had no idea that this would take so much time...
Thanks again for the help!
Dave
see
http://stackoverflow.com/questions/5543523/afxwin-h-file-is-missing-in-vc-express-edition
Microsoft Visual Studios is by far the easiest to install and get started with. I've downloaded and installed the 2010 version just because that's what other people had mentioned. I've been able to compile C programs by opening a "empty" project and renaming the file extension to .C following the instructions that I found here: http://stackoverflow.com/questions/3327199/how-can-i-use-visual-studio-2010-for-c-development
Anyhow, I hope this helps someone else and thanks again to everyone for your advice and help!
Dave
I've used VS2005 at work and home for a number of years and found it to be a very good product. My day-job will begin to use VS2010 later this year.
Only because we're behind the "release curve" of Microsoft products.
Our test system software has some levels of hooks into VS. Upgrading that software becomes a herculean effort when VS has a new release. I'm gonna guess VS2010 was chosen because that's what was available when the S/W department decided to move from WinXP to Win7 for the tester operating system.
Yes - changes occur slowly when a company has thousands of installed systems...
It seems to work on these tests I just did of some teensy tutorials I found on my hard drive:
These are all Win32 Console Apps, which are probably fine for most readers here.
Test is to copy to FlashDrive and then run on SamePC, or OtherPC (No VC++ install)
Select Debug or Release in the top line & rebuild to create exe's.
http://qt-project.org/downloads
There's lots of examples on how to do stuff and you don't have to fiddle with build scripts. Releasing you code for windows is also pretty straight forward and just involves copying a bunch of .dll files to the same directory as your .exe.
Additionally, the code you write in Qt is cross platform. I suggest reading up on how to work with Qt before creating you first GUI or command line application. Otherwise, you may end up wasting a lot of your time redoing things after you learn the proper way to do them. In particular, when making GUIs use the layout system...
https://play.google.com/store/books/details?id=TjR2G7BXkO8C&source=productsearch&utm_source=HA_Desktop_US&utm_medium=SEM&utm_campaign=PLA&pcampaignid=MKTAD0930BO1
As a fine example check out SimpleIDE. A nice IDE for Spin and C/C++ that runs everywhere, even on the Raspberry Pi.
Frankly, I haven't updated my installation for some time. So I'm sure many features work even better than when last I used them. I've always seen consistent improvements whenever I've updated to the latest version (a good sign!).
I started out wanting to be able to compile pic32 type C, as a test bed for the GUI on a 128x64 lcd. However, I soon found that microchip c will not compile on visual studio C, mainly because its not c99?? compliant. All local variable declarations have to be at the head of the function, which is an annoyance.
This led me to mingw and netbeans, with which I am familiar because of mplabx. Mingw happily compiles my code with the proper processor changes, and handles bitness the same as microchip. Therefore, I recommend mingw over vc++ at this point.
Now, if you wish to dig into c++, it may be different. However, once again be warned that Microsoft C++ is not completely compatible with everyone else. Especially if you want to use .net gui c++. I personally use it, but detest it compared to c.
I tried vs2013, can see no current benefit. ALL THE MENUS ARE CAPS FOR SOME REASON. For now am staying with 2008. All the nice c++ features they made available are only for win 8 apps.
Remember that one of the main benefits of Qt is the Q* framework. It uses MinGW (or that M$ junk if you prefer it). If you want straight up C/C++ you don't need Qt, but Qt's library framework is much nicer than the standard libc++std stuff especially regarding templates.
Qt applications will run practically everywhere, so that's something to consider. SimpleIDE is stuck in 4.8 library land at the moment, but will move to 5.2+ libraries given the chance (and my motivation).