This follows up on the recent report by Vu Nguyen that cuda.hpp breaks
with MSVC:
> c:\pycuda-0.94rc\src\cpp\cuda.hpp(32) :
> fatal error C1021: invalid preprocessor command 'warning'
> error: command '"C:\Program Files\Microsoft Visual Studio 9.0\VC\BIN\cl.exe"'
> failed with exit status 2

I've just moved to new WinXP machine with a GTX 480 (woot!) card with
CUDA 3.0. Upon compilation I hit the same problem. The issue is that:
#if (CUDA_VERSION == 3000)
in cuda.hpp is now active (before I had CUDA 2.3 IIRC) but MSVC
doesn't like the #warning statements, instead it needs:
#pragma warning
http://msdn.microsoft.com/en-us/library/2c8f766e%28VS.71%29.aspx

It looks like the best solution is to use a compiler-specific test:
#ifdef _MSC_VER
http://www.mobydisk.com/softdev/techinfo/cpptips.html#cpptip3
to switch between a "#pragma warning" block or the original "#warning" block.

If anyone knows of a better solution then say now else I'll make a
simple patch early next week.

i.
ps. I've also updated the "Windows Installation" wiki page with
updated version info and dependency package names.

-- 
Ian Ozsvald (A.I. researcher, screencaster)
i...@ianozsvald.com

http://IanOzsvald.com
http://morconsulting.com/
http://TheScreencastingHandbook.com
http://ProCasts.co.uk/examples.html
http://twitter.com/ianozsvald

_______________________________________________
PyCUDA mailing list
PyCUDA@tiker.net
http://lists.tiker.net/listinfo/pycuda

Reply via email to