With the latest master on WinXP with MSVC 9 I get the errors seen
below. I've attached a patch (it just re-orders 4 variable
declarations to make MSVC happy). There is a further problem that I've
yet to solve (see end of post).

Does anyone else have the latest master compiling and running with
MSVC? I'm wondering if this is a show stopper for anyone else?

C:\Panalytical\pycuda_git\pycuda_master>python setup.py install
...
running build_ext
building '_pvt_struct' extension
C:\Program Files\Microsoft Visual Studio 9.0\VC\BIN\cl.exe /c /nologo
/Ox /MD /W3 /GS- /DNDEBUG -IC:\Python26\include -I
C:\Python26\PC /Tcsrc/wrapper/_pycuda_struct.c
/Fobuild\temp.win32-2.6\Release\src/wrapper/_pycuda_struct.obj
_pycuda_struct.c
src/wrapper/_pycuda_struct.c(663) : error C2143: syntax error :
missing ';' before 'type'
src/wrapper/_pycuda_struct.c(664) : error C2143: syntax error :
missing ';' before 'type'
src/wrapper/_pycuda_struct.c(665) : error C2065: 're' : undeclared identifier
src/wrapper/_pycuda_struct.c(665) : error C2065: 're' : undeclared identifier
src/wrapper/_pycuda_struct.c(666) : error C2065: 're' : undeclared identifier
src/wrapper/_pycuda_struct.c(666) : error C2065: 'im' : undeclared identifier
src/wrapper/_pycuda_struct.c(666) : error C2065: 'im' : undeclared identifier
src/wrapper/_pycuda_struct.c(679) : error C2143: syntax error :
missing ';' before 'type'
src/wrapper/_pycuda_struct.c(680) : error C2143: syntax error :
missing ';' before 'type'
src/wrapper/_pycuda_struct.c(681) : error C2065: 're' : undeclared identifier
src/wrapper/_pycuda_struct.c(681) : error C2065: 're' : undeclared identifier
src/wrapper/_pycuda_struct.c(682) : error C2065: 're' : undeclared identifier
src/wrapper/_pycuda_struct.c(682) : error C2065: 'im' : undeclared identifier
src/wrapper/_pycuda_struct.c(682) : error C2065: 'im' : undeclared identifier
error: command '"C:\Program Files\Microsoft Visual Studio
9.0\VC\BIN\cl.exe"' failed with exit status 2

This error is described here:
http://andre.stechert.org/urwhatu/2006/01/error_c2143_syn.html
MSVC doesn't like C99-style variable declarations in the middle of the
function and wants C89 declarations at the start of the function (or
so the author states).

I can't run any code yet though, I'm still constrained by:
error: calling a __device__ function from a __host__ function is not allowed
as described before from the earlier complex branch:
http://www.mail-archive.com/pycuda@tiker.net/msg00919.html
I'm looking into this.

Cheers,
i.


-- 
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

Attachment: fix_error_c2143.patch
Description: Binary data

_______________________________________________
PyCUDA mailing list
pyc...@host304.hostmonster.com
http://host304.hostmonster.com/mailman/listinfo/pycuda_tiker.net

Reply via email to