How to use Intel C++ Compiler with NetBeans (Windows) - c++

In order to use ICC with NetBeans, a new toolchain has to be created.
Does anyone has already created a toolchain for ICC and NetBeans ?
If not, is there another way to use ICC with NetBeans ?

VCC4N is a Netbeans plugin for supporting Visual C++. Since Intel's compiler is pretty similar to VC++ (similar command-line options, debugger compatibility, etc.), it is likely this plugin can be modified to support ICC. I know, it's not a real solution (I haven't found one), but it could be a start.

Related

Can I build wxwidgets with clang++?

There are walkthroughs to build wxwidgets with common compilers on windows, such as MSVC or MinGW, but there are no options for clang. I do have the other two compilers, but I dislike using Visual Studio for projects that are not C# or other .NET languages and I just don't like MinGW, nothing specifically. I use clang to compile, and I'd like to build wxwidgets with it, but I don't know if it would error or not, so would it work? I'm using windows, if not already clear. Thanks in advance.
You can definitely build wxGTK and wxMac under Linux and Mac respectively with clang and I think people did build wxMSW under Windows with it too, but it's a less commonly used compiler there, so your best bet would be to just try doing it. If you run into any problems, please free to open tickets on wxTrac, we do want to support clang under this platform as well.

Which C++11 compilers for Windows support new type traits like "is_nothrow_move_constructible"?

Is there any C++11 compiler for Windows that supports the new C++11 type traits, like is_nothrow_move_constructible?
I was trying to write a container that supported it, only to find that none of my compilers (VC++ 2010, TDM MinGW32 GCC 4.6) support it...
For mingw, I would recommend STL's distro here (gcc 4.7.1). It comes with boost 1.50 also.
There also is mingw-w64 (a fork of the original mingw), I recommend rubenvb's personal builds here. Go to Toolchains targetting Win32 if you want the 32-bit versions. He also has personal builds of clang (clang support on windows is still very buggy. The x64 build will report linker errors so can only be used for better diagnostics, etc.)
STL's distro is very nice, however I find the mingw-w64 to have much better support for the win32 api (I have run into countless problems with the original mingw) and c++11 headers, such as <atomic> which is unsupported in the original mingw. mingw-w64 is much more actively developed (can create 32-bit and 64-bit binaries) and includes support for newer functions from windows vista and up.
For more info on the naming conventions of mingw-w64, see here and the faq.
Visual Studio C++ 2012 Beta supports a lot of C++11 type traits according to the reference. Have a look at the Visual Studio C++ 2012 Documentation However, I could not find is_nothrow_move_constructible documented there. It appears to be supported though.
GCC 4.7 does support is_nothrow_move_constructible you can try it on Windows by installing MinGW Distro.
Not an answer, but I just learned something from looking at the source code of GCC 4.7's type_traits header:
You don't even need is_nothrow_xyz in the first place!
The noexcept operator tells you if an exception throws.
So for these specific type traits, you can use that instead.
(Or at least in theory. Whether your compiler implements it is another matter.)

Using Visual C++ with a different C++ compiler?

I like the Visual Studio IDE. I'm used to it and find it is the best IDE I've ever tried. We also find increasing use of C#/.NET here.
However, after the underwhelming announcement regarding C++11 features in VS11 I'm looking into replacing the compiler.
It seems that the Intel compiler fully integrates with VS but that doesn't mean it will compile our Windows code. I don't know how I'd fare with a try of g++ or clang
Can VS actually be productively used with a different C++ compiler to compile Windows code, that is legacy code using all kinds of Win32 / MFC / COM stuff?
Depends on how much use you made of the Microsoft-proprietary extensions. Things like #pragma once tend to be supported by all the major compilers, but the weirder COM things (e.g., #import and anything C++/CLI) probably won't be. No idea if MFC will build under the new compiler, but you'll probably have to link it statically or ship your own DLL; G++ definitely uses a different mangling scheme than MSVC.
I'm not sure how easy it is to replace cl.exe and keep your vcproj files intact (though some compilers actually do it), but there are always Makefile projects.
I have never actually worked with the Intel C++ compiler, but I see no reason why it wouldn't compile the code that VC++ does. Here is official Intel documentation.
I use Visual Studio 2008 with a Makefile project to cross-compile; no reason you couldn't do the same with a different Windows compiler.

Replacement compiler for Qt Creator?

I like Qt Creator as an IDE, but the built-in compiler is slower than dirt.
Can I replace it, and if so, with what?
Developing on Windows but targeting multiple Mac as well.
By default on Windows the compiler is mingw, a port of GCC. Qt also contains support for the Visual Studio compilers, which you can switch to.
The only full-fledged C++ compiler on Macintosh is GCC.
C++, especially with template heavy code, is slow to compile. There is no avoiding this. In my experience, Visual Studio is not appreciably faster on complex code bases over GCC.
The choice of compiler depends on your toolchain (if you use qmake or cmake) plus your platform (e.g. cl is only available on Windows).
I don't think you can choose arbitrary compilers (e.g. Sun CC, Intel) and QtCreator will correctly picks up the compiling error messages. GCC is still the best supported compiler to use with QtCreator.
Perhaps a solution for you will be to pass -j8 as an extra build flag. Check the Projects pane.

Best way to setup a Windows build environment for C/C++

Basically I want to compile C/C++ using the GCC on Windows. The two competing platforms, as i see it, are MinGW and Cygwin. Each have their own benifits and limitations. MinGW compiles for Windows, whereas Cygwin needs the cygwin .dll. However installing libraries on MinGW is difficult, whereas on cygwin it's easier, using the setup.exe as a 'package manager'.
My question is what's the best way to compile on Windows. Would it be better to use MinGW and struggle with libraries (in which case is there an easy way of installing libraries on MinGW). Or should I use Cygwin, if so how do I get it to compile without needing the cygwin .dll, effectively compile for normal Windows.
The easiest and best way to compile on windows is to use visual studio express. It is free. A good reason for using cygwin is for cross platform builds. A good reason to use gcc is it supports some compiler candy the Microsoft compiler doesn't.
But all in all VC++ Express is the way to go for windows only development.
There is always the option of using -mno-cygwin with Cygwin to compile against Windows libraries like MinGW does:
gcc -mno-cygwin file.c -o test
It's not an easy choice and mainly depends on how much you will rely on other libraries. Cygwin really adds an additional layer, which is heavier but "emulates" the Linux environment better than MinGW.
Edit:
Qt Creator allows you to compile with MinGW on Windows (and gcc on Linux, ...), has an IDE that makes debugging more friendly than gdb. If you need libraries, you still have the option of using the Qt libraries. That would be a good alternate solution to the Visual Studio if you really want to stick to gcc for future portability.
You might want to look at CodeBlocks. It is generally used to build WxWidgets apps, but it wraps MinGW nicely.
Actually, there's option #3: if your edition of Windows permits it, you can install Microsoft Services For Unix / Subsystem for Unix Applications, and then get gcc from SUACommunity. It has a package manager, too. Of those 3 options, this will give you behavior closest to a true Unix system.
However, the resulting applications aren't Win32 applications; they're SUA applications, and will require SUA to run. If you write code for yourself, it's usually not a problem if you write code for yourself, but if you want to write and distribute a proper Windows application, I would suggest staying away from anything that tries to emulate Unix, so MinGW it is.
Qt Creator comes with MinGW as standard and can be used to build projects that don't actually use the Qt framework.
There's an easy to install MinGW wrapped GCC at equation.com.
Click "Programming Tools" then "Fortran, C, C++", download the release you prefer, install and use.
One possible method is to use CMake which can build Visual Studio project from your sources and then compile from Visual Studio. It can build project for other IDEs too, so you can go cross platform.
I think the answer depends on whether you intend to use libraries or compile programs that are targeted to POSIX or a POSIX-based target. That's what Cygwin is intended for, while MinGW is more intended for compiling Windows-targeted programs using GCC.
Another option is TDM MinGW: http://www.tdragon.net/recentgcc/
It's basically an unofficial fork of MinGW with the latest GCC compiler available for both 32- and 64bit windows machines. Even some MinGW developers themselves use it.
Equation Gcc is even better: http://www.equation.com/servlet/equation.cmd?fa=fortran