building with cygwin build tools

I’m wondering if anyone has successfully built CUDA applications using cygwin and the gnu toolchain instead of Visual C. Are there any examples out there?

I’ve never tried this, but the Linux toolchain uses gcc so it should be possible.

I’ve given it a shot, but no luck yet. One problem is that nvcc fails to find the standard system includes (like stdio.h), even when their location is specified explicitly with -I. Regular gcc finds them ok. I can work around that one, but then nvcc fails while trying to execute a command called “cl” which is not found.

There is no command called “cl” on my linux system either, but nvcc works fine there.

I’m not an expert with cygwin, nor with nvcc. Has anybody else attempted this? I don’t have visual studio (and I don’t want to!), so I need to find an alternate way to compile for windows.


cl is the Microsoft compiler and it is used by nvcc to compile the host code on Windows. On Linux, for the same role, gcc is used.

You can install Visual Studio Express ( free download) and compile from a command shell.

cl is microsoft’s command line compiler. You can get a free version. I would think using cl throughout the entire build process would make things much simpler since that is the compiler that has obviously been tested under windows. If you do that you’ll almost certainly want to use microsoft’s link as well (not the one that is by default in /usr/bin under cygwin.)

Whether or not you want to do that depends on your motivations, I suppose. If you want to use cygwin because you’d rather code with vim and make instead of VS then it would work just fine. If it is because you abhor anything microsoft, then why are you using windows? :)

I ran into this also but then gave up and switched to VS on Win.

Just wondering: why does NVIDIA enforce using cl on Windows? nvcc obviously knows the GCC rules. Why can’t we switch it with some cmdline arg? There is already the -Xcompiler to pass args to it, so why can’t we have a switch to set it or at least choose from a supported list?


I need help!

Got my geforce a week ago, and have been trying to install it all day…

In the manual of nvcc it said to use MSVC 8.0 or 7.0, so I downloaded Microsoft Visual C++ Express 8.0 edition and installed it, and adapted nvcc.profile to point to the cl. But than nvcc complained it doesn’t find an appropriate cl:

nvcc fatal : nvcc cannot find a supported cl version. Only MSVC 7.1 and MSVC 8.

0 are supported

I don’t know a lot about windows developing so I downloaded visual studio as well and it still didn’t work…I tried reinstalling Microsoft Visual C++ Express 8.0 edition but still nothing. What I did note was that Microsoft Visual C++ Express 8.0 gets installed under the directory: Microsoft Visual Studio 9.0/ . And it is under there that I find the directory VC/bin/cl. So I’m thinking the compiler is actually the one from version 9. But I can’t seem to be able to download one of version 8.

To cut my story short, I’ve been messing around all day and got nada…

Can any of you point me in the right direction?


You probably installed Visual Studio 2008 ( 2008 = MSVC 9.0).

Take a look at this thread for info on where to find Visual Studio 2005 Express:

Thx! Nvcc does complain abouth the compiler anymore, but I m still not there,

now nvcc sais: nvcc fatal : Visual Studio configuration file ‘(null)’ could not be found for installation at ‘C:/Program Files (x86)/Microsoft Visual Studio 8/VC/bin’

Do you know this problem as wel? Googled it and found nothing…

I tried to uninstall every thing I install prior to Visual Studion 2005 Express, but maybe something didn’t install correctly?

i have the same problem

there is a Solution for that ?