Re: [Plib-devel] RE: Olivier's js code (LAVIGNE,ERIC), cygwin build problem
Brought to you by:
sjbaker
From: LAVIGNE,ERIC <la...@uf...> - 2004-08-15 14:35:50
|
Ima, I found these two bug fixes in John Fay's version of jsWindows.cxx. Please let me know if it compiles in Cygwin after making these changes. 1) line 44 static bool getOEMProductName changes to bool os_specific_s::getOEMProductName 2) line 119 getOEMProductName changes to os->getOEMProductName Eric Lavigne On Sun Aug 15 09:09:01 EDT 2004, Ima Sudonim <ima...@ve...> wrote: > Eric, > > Thank you very much for putting this fix in. > > Sorry, I said cygwin works, but it doesn't. > > I am getting a build break under cygwin as shown here: > > if g++ -DPACKAGE_NAME=\"\" -DPACKAGE_TARNAME=\"\" > -DPACKAGE_VERSION=\"\" -DPACKAGE_STRING=\"\" > -DPACKAGE_BUGREPORT=\"\ > -DPACKAGE=\"plib\" -DVERSION=\"1.8.4\" -DSTDC_HEADERS=1 > -DHAVE_SYS_TYPES_H=1 -DHAVE_SYS_STAT_H=1 -DHAVE_STDLIB_H=1 -DH > E_STRING_H=1 -DHAVE_MEMORY_H=1 -DHAVE_STRINGS_H=1 > -DHAVE_INTTYPES_H=1 -DHAVE_STDINT_H=1 -DHAVE_UNISTD_H=1 -DWIN32=1 > - > -I. -I../../src/util -g -O2 -Wall -MT jsWindows.o -MD -MP -MF > ".deps/jsWindows.Tpo" \ > -c -o jsWindows.o `test -f 'jsWindows.cxx' || echo > './'`jsWindows.cxx; \ > then mv ".deps/jsWindows.Tpo" ".deps/jsWindows.Po"; \ > else rm -f ".deps/jsWindows.Tpo"; exit 1; \ > fi > js.h: In function `bool getOEMProductName(jsJoystick*, char*, > int)': > js.h:47: error: `int jsJoystick::error' is protected > jsWindows.cxx:46: error: within this context > js.h:45: error: `os_specific_s*jsJoystick::os' is protected > jsWindows.cxx:61: error: within this context > js.h:45: error: `os_specific_s*jsJoystick::os' is protected > jsWindows.cxx:72: error: within this context > > I have updated cygwin to the latest cygwin GCC: > > $ gcc --version > gcc (GCC) 3.3.3 (cygwin special) > Copyright (C) 2003 Free Software Foundation, Inc. > This is free software; see the source for copying conditions. > There is NO > warranty; not even for MERCHANTABILITY or FITNESS FOR A > PARTICULAR PURPOSE. > > and the problem still occurs. > > I can fix the first problem by adding an accessor function in > js.h like: > > int getError () const { return error ; } > > that is called from within jsWindows.cxx as: > > if ( joy->getError() ) return false ; > > but I am not sure how to fix the other two. Can anyone please > help? Do non-Cygwin users on windows also see this problem? > > How can we safely access os-specific protected data? Do we need > to do all of the getOEMProductName() os-specific processing > within a jsJoystick class member function as is done within > jsJoystick::jsJoystick ( int ident ) in jsLinux.cxx? > > Thanks, Eric, for putting this fix in, and thanks to any > C++/Cygwin experts that can fix it! > > Ima |