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 13:50:51
|
Ima, I get the same set of errors under MSVC++.net (but with different wording). Two ideas: 1) This shouldn't be happening. GetOEMProductName is a member of struct os_specific_s which is a friend of jsJoystick. Therefore GetOEMProductName should be able to access protected (and even private) members of jsJoystick directly. All three errors complain about GetOEMProductName accessing protected members of jsJoystick. 2) You fixed one of the three problems by creating a getter method. As far as I can tell, the three problems are essentially identical. So getter methods should work on them too. As I mentioned in (1), though, getters shouldn't be necessary. I would prefer to figure out why we are running into this problem, but it is more important to get plib working again quickly. If we can't fix this problem for real by tonight, I will write some getters. 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 |