I am working on a scientific project at the University of Innsbruck. Therefor i am creating 3d volumetric imaging tools with the QT-Framework. Since i only use the open source distribution of QT, i have to rely on MinGW for Windows to compile my software.
So how can I compile cuda binaries, libs, … with the MinGW environment eg. without Microsoft Visual Studio.
Is there any tutorial available for nvcc makefiles to execute in a console under Windows XP?
Haven’t tried that. There is a VS version of QT4 but it is not free (unlike the MinGW version). I would be a bit surprised if Trolltech would allow you to compile it from source yourself when they want to sell it.
Ah, sorry my fault. It is the other way around. Quote Trolltech:
That is good news. So we only need a CUDA version for MinGW. That should be a snap to do for NVIDIA given that they already have the GCC machinery working in the Linux version.
@NVIDIA: will we be able to switch nvcc on XP to use MinGW gcc ?
Quite a while back I remember I once got Intel’s C++ compiler to link with libraries created with the minGW gcc…so I imagine it would be theoretically possible with microsoft’s as well.
I don’t remember exactly what I did, but I believe I used Intel as the linker and passed the minGW libraries AND the Intel/microsoft libraries themselves explicity. The order in which the libraries were passed mattered a great deal, I think it was Intel first.
It might be worth trying if you can’t wait or if for some reason gcc under minGW won’t work with CUDA.
Is there anybody who has succeeded in using MINGW gnu compilers and CUDA together?
NOTE:
While looking through the NVCC manual I see that there are a couple of compiler flags that say they are to be used on MINGW or CYGWIN. So I am sure someone at NVIDIA has implemented these …
Would you please care to let the rest of us know how to use MINGW?
Now it is 2016. So how about now? I cannot even use my Zed on Windows, because of the crappy VS dependancy. Why is there this technical limitation? If you already support GCC on Linux, then what is the technical reason not to support it on windows?
CUDA uses a fairly tight integration with the host compiler. For example data structure alignment in memory must match, for every possible/conceivable arrangement of data types and qualifiers. Also, object file formats must be completely compatible. So there is actual technical effort to create the interface in the first place. If you want to see all the moving parts in the CUDA compilation process, run nvcc with the --verbose switch.
Any interface must be validated. There is a QA effort/cost involved. Adding an additional configuration adds an additional dimension to the QA matrix, so the cost to add one major new dimension (like a compiler supported) can be considerable in terms of effort to validate the interface.
The premier compiler on Windows is the one that is provided by the Windows vendor, namely Microsoft. Large commercial codebases get developed on this platform. So it will be the first choice of supported compilers on windows. In order to support other compilers, there would have to be significant market demand, as evidenced by actual usage for large industrial/commercial/enterprise codebases.
The situation is not likely to change in the near future. If there is enough evidence of need and demand, I’m sure NVIDIA would respond, however a constant theme internally is to look for ways to reduce the support matrix, not increase it. This is so that limited resources can be focused where they will provide the most benefit.
There are no technical issues that absolutely prevent the support of additional compilers. But there are definitely resource limitations, and support for a new compiler platform on windows would require a significant expenditure of resource and effort. The fact that it does not exist today indicates so far that the cost/benefit scenario is not compelling.
My comments above apply to the NVIDIA-provided toolchain, of course. There exist other toolchains that target CUDA GPUs, my comments don’t apply to those toolchains or efforts.
now msvc includes clang frontend, you may try it. there is also intel compiler. both ways you should get support of all gcc extensions, while being obj-file/ABI compatible with msvc
This would be a problem if Nvidia didn’t support GCC at all. It does support it. Just not officially on Windows. I think there would be close to zero technical changes necessary to support MinGW.
2, 3) Can be basically summarized to not enough resources. For a company as big as Nvidia it shouldn’t be that big of an issue. I guess laziness is also a valid excuse these days. Less and less people are using VC these days though, because of the platform limiting factor.
I also actually only need to link a compiled CUDA library. For my GPGPU needs I happily use OpenCL. Doesn’t help that Nvidia hasn’t release the OpenCL driver for Jetson’s though, contrary what they promised. :(
I will have to work around it I guess. I’ll won’t use CUDA on Windows and only enable it on Linux.
MinGW64 support would be really great! Thanks to MSYS2, a full Cuda build environment would be set up in ~20 minutes, and allows to build ~1000 standard libraries on Windows.