Re: [Plib-users] OS X Compatibility? Errors
Brought to you by:
sjbaker
From: Steve B. <sjb...@ai...> - 2003-08-07 21:34:04
|
Krippel Harald wrote: > In file included from js.cxx:23: > js.h:100: size of member `ioDevices' is not constant So the problem is that ioDevices is defined in js.h and in jsMacOSX.cxx as io_object_t jsJoystick::ioDevices[kNumDevices]; ...but static objects need to have their size known at compile time - and anything that #include's js.h can't know the value of kNumDevices - even though it's a 'const'. I think we need to add into js.h something like: #define JS_MAX_OSX_DEVICES 32 ...and replace the kNumDevices line in jsMacOSX.cxx with: int jsJoystick::kNumDevices = JS_MAX_OSX_DEVICES ; ...and in js.h: static io_object_t jsJoystick::ioDevices[JS_MAX_OSX_DEVICES] ; ...and in jsMacOSX.cxx: io_object_t jsJoystick::ioDevices[JS_MAX_OSX_DEVICES] ; This should fix the problem - I don't understand how it could ever have compiled in the first place. ---------------------------- Steve Baker ------------------------- HomeEmail: <sjb...@ai...> WorkEmail: <sj...@li...> HomePage : http://www.sjbaker.org Projects : http://plib.sf.net http://tuxaqfh.sf.net http://tuxkart.sf.net http://prettypoly.sf.net -----BEGIN GEEK CODE BLOCK----- GCS d-- s:+ a+ C++++$ UL+++$ P--- L++++$ E--- W+++ N o+ K? w--- !O M- V-- PS++ PE- Y-- PGP-- t+ 5 X R+++ tv b++ DI++ D G+ e++ h--(-) r+++ y++++ -----END GEEK CODE BLOCK----- |