Variety of C++ compilers.
-
I am using Qt Creator as an IDE with gcc toolkit running underneath, both on Windows and Linux Ubuntu. Will continue with same tools on Mac OS soon. I use this for the UniSim open-source project http://www.ecolmod.org/[^] maintained at GitHub.
Niels Holst, Aarhus University, Denmark
Looks like an interesting project. I have used Qt for Linux/Windows/MacOSX development in the educational field. Qt Creator has some good points and I like the Qt UI output but the backend is unfortunately unsustainable as it multiplies in complexity in order to support new systems. They may yet rescue this but only if Nokia can afford it and it will cost millions. I wish them well but I've decided to go my own way.
"The secret of happiness is freedom, and the secret of freedom, courage." Thucydides (B.C. 460-400)
-
I'm interested to know what the range and popularity of different C++ compilers and linked IDEs is amongst my fellow CPians. My guess is that there are really good stats for this buried away somewhere in Bob's sock draw from numerous surveys over the past few years. It would be nice if someone could dig them out and collate them ;P I'm especially interested to see what the range of Visual Studio versions used looks like given the large number of variants now in circulation and whether there's any uptake of Clang given that it seems to struggle to produce Windows binaries. An article on portability between compilers will follow eventually if I can ever get it knocked into shape.
"The secret of happiness is freedom, and the secret of freedom, courage." Thucydides (B.C. 460-400)
When I was doing serious C++ programming, I was most efficient working in Vim, and periodically running the code through PC-Lint. If lint said it was OK, then the compiler was generally happy. This light-weight solution yielded high-quality (lint-compliant) code, and the tools ran great on my limited laptop. I compiled using Visual Studio 2008, and when possible, g++ on Linux. I found that the STL was generally more standards-compliant on Linux. I'm not doing any C++ development these days, but I certainly miss it. It is the language of kings!
-
I'm interested to know what the range and popularity of different C++ compilers and linked IDEs is amongst my fellow CPians. My guess is that there are really good stats for this buried away somewhere in Bob's sock draw from numerous surveys over the past few years. It would be nice if someone could dig them out and collate them ;P I'm especially interested to see what the range of Visual Studio versions used looks like given the large number of variants now in circulation and whether there's any uptake of Clang given that it seems to struggle to produce Windows binaries. An article on portability between compilers will follow eventually if I can ever get it knocked into shape.
"The secret of happiness is freedom, and the secret of freedom, courage." Thucydides (B.C. 460-400)
-
To be specific I'm writing a set of libraries to enable common code to be built with many different compilers in many different IDEs as part of a larger project. The technical side is challenging but if I need help with that I'll post to the appropriate forum. What would be of real value to me in prioritizing which compilers and IDEs to support beyond the obvious is the meta knowledge of the Code Project community as what they would find valuable. Is there a silent but substantial crowd out there using the Intel compiler backend to Visual Studio or is it a complete dead loss with no user base at all?
"The secret of happiness is freedom, and the secret of freedom, courage." Thucydides (B.C. 460-400)
I'm using VC++ a la VS 2008, when I use it these days (which is never). I've used a bit of gcc for Linux, but which flavor depended on which version came native with whatever version of Linux I was on at the time. However, about this portability framework. I've always found it wasn't the compiler flavors that were the problem, but the libraries. For compilers, pick the most common C++ compiler on each OS, and write to the oldest C++ standard they will all compile.
We can program with only 1's, but if all you've got are zeros, you've got nothing.
-
I'm using VC++ a la VS 2008, when I use it these days (which is never). I've used a bit of gcc for Linux, but which flavor depended on which version came native with whatever version of Linux I was on at the time. However, about this portability framework. I've always found it wasn't the compiler flavors that were the problem, but the libraries. For compilers, pick the most common C++ compiler on each OS, and write to the oldest C++ standard they will all compile.
We can program with only 1's, but if all you've got are zeros, you've got nothing.
I agree, compilers is just the first stage, hence why they need a -nodefaultlibs equivalent to qualify for inclusion. Once the compiler is tamed, the correct hardware architecture is targetted and the OS system calls have been drilled into submission, then come the libraries which is where the fun really starts. Imagine a 'C' library which is complete to Posix 2008 but is really just a shim over a C++ implementation which is itself portable and fully instrumented for aspect programming. Well no one ever said I wasn't crazy :wtf:
"The secret of happiness is freedom, and the secret of freedom, courage." Thucydides (B.C. 460-400)
-
I'm interested to know what the range and popularity of different C++ compilers and linked IDEs is amongst my fellow CPians. My guess is that there are really good stats for this buried away somewhere in Bob's sock draw from numerous surveys over the past few years. It would be nice if someone could dig them out and collate them ;P I'm especially interested to see what the range of Visual Studio versions used looks like given the large number of variants now in circulation and whether there's any uptake of Clang given that it seems to struggle to produce Windows binaries. An article on portability between compilers will follow eventually if I can ever get it knocked into shape.
"The secret of happiness is freedom, and the secret of freedom, courage." Thucydides (B.C. 460-400)
The biggest issue I have found is how header files can change. I had to help port a large Solaris 8 suite that ran on Solaris 8 (X86 & SPARC), Linux, and Windows to just be on Solaris 10 X86. The major change was fuller (and strict) ANSI support as well as 64-bit versus 32-bit. Another change is that sometimes header files move, or what you want to use is now defined in a different header file. I have used VS 2008, 2010, and am starting to look at 2012 on Windows. However, I have also used the Netbeans IDE combined with GCC on Windows, Solaris, and Linux. I had one job where they used a very early VS ('96?) that was terrible! I did all my coding in Netbeans + GCC and only did the builds in VS when I had to generate code for that embedded platform. The current Solaris Studio IDE is really Netbeans IDE using the Sun/Oracle compiler as a backend. Netbeans can also use that compiler as the backend. Mike
-
The biggest issue I have found is how header files can change. I had to help port a large Solaris 8 suite that ran on Solaris 8 (X86 & SPARC), Linux, and Windows to just be on Solaris 10 X86. The major change was fuller (and strict) ANSI support as well as 64-bit versus 32-bit. Another change is that sometimes header files move, or what you want to use is now defined in a different header file. I have used VS 2008, 2010, and am starting to look at 2012 on Windows. However, I have also used the Netbeans IDE combined with GCC on Windows, Solaris, and Linux. I had one job where they used a very early VS ('96?) that was terrible! I did all my coding in Netbeans + GCC and only did the builds in VS when I had to generate code for that embedded platform. The current Solaris Studio IDE is really Netbeans IDE using the Sun/Oracle compiler as a backend. Netbeans can also use that compiler as the backend. Mike
Yes the libraries and headers moving around and not being quite the same is the bane of cross platform development in C++. That's why the longer term project I'm working at has a strictly Posix compliant shim for the C library so there really is only one interface regardless of the underlying platform. I've just been tinkering with Netbeans on Open Suse and am half way through upgrading from 7.1 to 7.2.1 which should give me built in CLang integration, the last item on my target list for the moment. I'd probably use Netbeans everywhere but it's a massive memory hog and will seldom start on my Windows7 system unless I run it straight after to boot up. Despite having 8Gb to look in it claims not to be able to allocate ~750 MB of contiguous memory and folds on startup. Perhaps I need a Java update. Anyway I reckon native Windows and Linux compilers, 32 and 64 bit and Microsoft, Borland and LLVM backends should be enough to prove the point. :)
"The secret of happiness is freedom, and the secret of freedom, courage." Thucydides (B.C. 460-400)
-
Yes the libraries and headers moving around and not being quite the same is the bane of cross platform development in C++. That's why the longer term project I'm working at has a strictly Posix compliant shim for the C library so there really is only one interface regardless of the underlying platform. I've just been tinkering with Netbeans on Open Suse and am half way through upgrading from 7.1 to 7.2.1 which should give me built in CLang integration, the last item on my target list for the moment. I'd probably use Netbeans everywhere but it's a massive memory hog and will seldom start on my Windows7 system unless I run it straight after to boot up. Despite having 8Gb to look in it claims not to be able to allocate ~750 MB of contiguous memory and folds on startup. Perhaps I need a Java update. Anyway I reckon native Windows and Linux compilers, 32 and 64 bit and Microsoft, Borland and LLVM backends should be enough to prove the point. :)
"The secret of happiness is freedom, and the secret of freedom, courage." Thucydides (B.C. 460-400)
My laptop had only 4GB, but it still ran Netbeans okay, usually with a FF browser up. With 8GB I often am running a VM with it, and the browser. For some classes I had I even ran Netbeans in the VM, which I only allotted 2GB (it was Linux) and it ran fine. It have used Java 6 and 7 for it, but prefer to use 7 (prettier JavaDoc output). Mike
-
My laptop had only 4GB, but it still ran Netbeans okay, usually with a FF browser up. With 8GB I often am running a VM with it, and the browser. For some classes I had I even ran Netbeans in the VM, which I only allotted 2GB (it was Linux) and it ran fine. It have used Java 6 and 7 for it, but prefer to use 7 (prettier JavaDoc output). Mike
Yep I can reliably run Netbeans 7.2.1 in an Open Suse VM with 2GB allocated but for whatever reason I still get frequent failures to launch with unable to allocate memory messages on the Windows7 host machine itself even though it has 8GB and only ~2.5 in use without the VM running. It must be a JDK or config issue somewhere but I have no idea what as it works as long as I start it immediately after a reboot :confused: I'll grab some updates and the latest Windows build of Netbeans tomorrow and see if things improve. Have got CLang 3.0 going with Netbeans on the Open Suse VM now and it builds the test code fine with the same results as GCC. :cool:
"The secret of happiness is freedom, and the secret of freedom, courage." Thucydides (B.C. 460-400)
-
I'm interested to know what the range and popularity of different C++ compilers and linked IDEs is amongst my fellow CPians. My guess is that there are really good stats for this buried away somewhere in Bob's sock draw from numerous surveys over the past few years. It would be nice if someone could dig them out and collate them ;P I'm especially interested to see what the range of Visual Studio versions used looks like given the large number of variants now in circulation and whether there's any uptake of Clang given that it seems to struggle to produce Windows binaries. An article on portability between compilers will follow eventually if I can ever get it knocked into shape.
"The secret of happiness is freedom, and the secret of freedom, courage." Thucydides (B.C. 460-400)
In my day job, I regularly use Visual Studio .NET 2003 and Visual Studio 2008. After-hours consulting, I use VS2003, VS2008, and Qt Creator[^]. Qt uses gcc on Linux, and MINGW or VS2008 on Windows.
Software Zen:
delete this;
-
Yep I can reliably run Netbeans 7.2.1 in an Open Suse VM with 2GB allocated but for whatever reason I still get frequent failures to launch with unable to allocate memory messages on the Windows7 host machine itself even though it has 8GB and only ~2.5 in use without the VM running. It must be a JDK or config issue somewhere but I have no idea what as it works as long as I start it immediately after a reboot :confused: I'll grab some updates and the latest Windows build of Netbeans tomorrow and see if things improve. Have got CLang 3.0 going with Netbeans on the Open Suse VM now and it builds the test code fine with the same results as GCC. :cool:
"The secret of happiness is freedom, and the secret of freedom, courage." Thucydides (B.C. 460-400)
I would be sure you have the Oracle JVM installed and not the Open JDK. Sometimes the features are not in sync between the official JVM and the Open version. Since the Oracle one is free, I always use it and remove the Open JDK.