Re: [Cooker] C++ expert please

2003-08-24 Thread Gwenole Beauchesne
It looks okay to me.
(Error again is line 21: ISO C++ forbids defining types within return 
type)

#ifdef HAVE_LONG_LONG
  operator LONG_LONG () const {
That's not definition of type LONG_LONG but an implicit conversion from 
some class to this type. Better post the preprocessed output...

I guess the easy way to fix this would be to somehow un-define 
HAVE_LONG_LONG?
That's not a fix.




[Cooker] C++ expert please

2003-08-23 Thread Austin
I need a C++ hacker to tell me how to fix this build please...

g++ -c -O2 -fomit-frame-pointer -pipe -march=i586 -mcpu=pentiumpro -I../
unix/../include -I../unix/../python/scxx -I/usr/include/python2.3 ../unix/../
python/PyProperty.cpp  -fPIC -DPIC
In file included from ../python/PyProperty.cpp:11:
../python/scxx/PWONumber.h:19: error: syntax error before `i'
../python/scxx/PWONumber.h:21: error: ISO C++ forbids defining types within 
return type
../python/scxx/PWONumber.h:21: error: semicolon missing after declaration of 
`class PWONumber'
../python/scxx/PWONumber.h: In function `int PWONumber(double)':
../python/scxx/PWONumber.h:21: error: only constructors take base initializers
../python/scxx/PWONumber.h:21: confused by earlier errors, bailing out

The file lines 18-21 are:
#ifdef HAVE_LONG_LONG
  PWONumber(LONG_LONG i) : PWOBase (PyLong_FromLongLong(i)) { LoseRef(_obj); }
#endif
  PWONumber(double d) : PWOBase (PyFloat_FromDouble(d)) { LoseRef(_obj); }
Thanks,
Austin
--
Austin Acton Hon.B.Sc.
 Synthetic Organic Chemist, Teaching Assistant
   Department of Chemistry, York University, Toronto
 MandrakeClub Volunteer (www.mandrakeclub.com)
 homepage: www.groundstate.ca