[Bf-committers] NDOF patch and plugin for Linux
Ettore Pasquini
ettore_pasquini at 3dconnexion.com
Wed Jul 11 01:04:51 CEST 2007
On 7/10/07 2:32 PM, "Jean-Luc Peurière" <jlp at nerim.net> wrote:
> Ettore, can you check the following error, which stuck olivier. It is clearly
> a qualifier
> error, but as i cant test myself (no linux), it is a bit hard for me to find
> it.
>
> note i applied the patch by hand because my own tree is unclean, so i may have
> forgotten
> something (but checked twice). It is a bit late, cant find the error now.
>
> 1. intern/ghost/intern/GHOST_SystemX11.cpp:483: erreur: no matching function
> for call to «GHOST_TEventNDOFData::GHOST_TEventNDOFData(volatile
> GHOST_TEventNDOFData&)»
> 2. intern/ghost/GHOST_Types.h:365: note: candidats sont:
> GHOST_TEventNDOFData::GHOST_TEventNDOFData(const GHOST_TEventNDOFData&)
> 3. intern/ghost/GHOST_Types.h:365: note:
> GHOST_TEventNDOFData::GHOST_TEventNDOFData()
> 4. intern/ghost/intern/GHOST_SystemX11.cpp:483: erreur: initialising
> argument 4 of «GHOST_EventNDOF::GHOST_EventNDOF(GHOST_TUns64,
> GHOST_TEventType, GHOST_IWindow*, GHOST_TEventNDOFData)»
It looks like the compiler doesn't like the volatile qualifier. Mmmh... I
compiled with scons and gcc 4.1.2 and I didn't get this error. Which
compiler and build system are you using, Oliver?
As a quick & dirty solution, I would say try to cast away the volatile
qualifier with something like
(const GHOST_TEventNDOFData&)*sNdofInfo.currValues);
at line 483.
Or, replace lines 464-484 of the patched GHOST_SystemX11.cpp with the
following:
......
......
if (sNdofInfo.currValues) {
GHOST_TEventNDOFData data;
data.changed = 1;
data.delta = xcme.data.s[8] - data.time;
data.time = xcme.data.s[8];
data.tx = xcme.data.s[2] >> 4;
data.ty = xcme.data.s[3] >> 4;
data.tz = xcme.data.s[4] >> 4;
data.rx = xcme.data.s[5];
data.ry = xcme.data.s[6];
data.rz = xcme.data.s[7];
g_event = new GHOST_EventNDOF(getMilliSeconds(),
GHOST_kEventNDOFMotion,
window, data);
} else {
......
......
Let me know how this goes.
Ettore
More information about the Bf-committers
mailing list