From: Waldemar O. <wal...@gm...> - 2005-03-17 00:25:02
|
On Wed, 16 Mar 2005 18:09:12 +0100, Ivan Vilata i Balaguer <iv...@ca...> wrote: > On Tue, Mar 15, 2005 at 02:40:37PM -0700, Waldemar Osuch wrote: > > Recently I have set up my machine for compiling pytables on WindowsXP > > with Python-2.4. > > [...] > > building 'tables.hdf5Extension' extension > > C:\Program Files\Microsoft Visual Studio .NET 2003\Vc7\bin\cl.exe /c /nologo /Ox > > /MD /W3 /GX /DNDEBUG -DWIN32=1 -DNDEBUG=1 -D_HDF5USEDLL_=1 -Ic:\gnu\src\hdf5\in > > clude -Ic:\python\python24\include -Ic:\python\python24\PC /Tcsrc/typeconv.c /Fo > > build\temp.win32-2.4\Release\src/typeconv.obj > > typeconv.c > > src\typeconv.c(45) : error C2036: 'void *' : unknown size > > src\typeconv.c(51) : warning C4013: 'lround' undefined; assuming > > extern returning int > > src\typeconv.c(62) : error C2036: 'void *' : unknown size > > error: command '"C:\Program Files\Microsoft Visual Studio .NET > > 2003\Vc7\bin\cl.exe"' failed with exit status 2 > > [..] > Thanks a lot for your mail. The pointer problems seem to be related > with the strange way MSVC has to do pointer arithmetic. The missing > 'lround' function is part of the C99 standard, which is not supported by > MSVC. > > I have attached a simple patch which makes pointer arithmetic in the MS > way and defines an 'lround' function if C99 is not supported. Could you > please apply it to src/typeconv.c and check whether it works? I am also > interested in checking that tests/test_timetype.py works right. > I am not a C programmer by any stretch of imagination so although your explanation seems to make sense I can not comment :-). Good news is that the patch almost worked. I had to tweak it a little to appease the MS compiler. See attached. test_timetype.py run in isolation passes all 12 tests. test_all.py is not so lucky. There is about 75 file permission errors showing during tear down but it must be something silly. I will have a look at it and report back. Waldemar |