I'm not sure if I should file a bug about it because I suspect I might be doing something wrong. Here is what I was getting when trying to build JInput from CVS on GNU/Linux 2.4.26 by issuing 'ant' command in source root:
Buildfile: build.xml
init:
core:
init:
compile:
[javac] Compiling 17 source files to /home/max/projects/jinput_2004-08-25/coreAPI/classes
jar:
[jar] Building jar: /home/max/projects/jinput_2004-08-25/coreAPI/bin/jinput.jar
[copy] Copying 1 file to /home/max/projects/jinput_2004-08-25/plugins/DX8/lib
all:
[echo] JInput has been built and jinput.jar is located in the bin directory.
windows_plugin:
linux_plugin:
init:
[mkdir] Created dir: /home/max/projects/jinput_2004-08-25/plugins/linux/classes
[mkdir] Created dir: /home/max/projects/jinput_2004-08-25/plugins/linux/bin
compileNativeJinputLib:
init:
[mkdir] Created dir: /home/max/projects/jinput_2004-08-25/plugins/linux/src/native/build
[mkdir] Created dir: /home/max/projects/jinput_2004-08-25/plugins/linux/src/native/apidoc
compileNativeJinputLib:
[exec] In file included from EventDevice.h:32,
[exec] from jinput.cpp:37:
[exec] eventInterfaceTypes.h:16: error: redefinition of `struct input_absinfo'
[exec] /usr/include/linux/input.h:49: error: previous definition of `struct
[exec] input_absinfo'
[exec] In file included from EventDevice.h:32,
[exec] from eventInterface.cpp:37:
[exec] eventInterfaceTypes.h:16: error: redefinition of `struct input_absinfo'
[exec] /usr/include/linux/input.h:49: error: previous definition of `struct
[exec] input_absinfo'
[exec] In file included from EventDevice.cpp:27:
[exec] eventInterfaceTypes.h:16: error: redefinition of `struct input_absinfo'
[exec] /usr/include/linux/input.h:49: error: previous definition of `struct
[exec] input_absinfo'
[exec] EventDevice.cpp: In member function `virtual int EventDevice::poll()':
[exec] EventDevice.cpp:337: error: `EV_RST' undeclared (first use this function)
[exec] EventDevice.cpp:337: error: (Each undeclared identifier is reported only once
[exec] for each function it appears in.)
[exec] In file included from JoystickDevice.h:32,
[exec] from joystickInterface.cpp:37:
[exec] eventInterfaceTypes.h:16: error: redefinition of `struct input_absinfo'
[exec] /usr/include/linux/input.h:49: error: previous definition of `struct
[exec] input_absinfo'
[exec] In file included from JoystickDevice.cpp:27:
[exec] eventInterfaceTypes.h:16: error: redefinition of `struct input_absinfo'
[exec] /usr/include/linux/input.h:49: error: previous definition of `struct
[exec] input_absinfo'
[exec] In file included from MixedDevice.cpp:27:
[exec] eventInterfaceTypes.h:16: error: redefinition of `struct input_absinfo'
[exec] /usr/include/linux/input.h:49: error: previous definition of `struct
[exec] input_absinfo'
[exec] Result: 1
BUILD FAILED
I needed to apply these changes to make it compile:
Index: plugins/linux/src/native/EventDevice.cpp
===================================================================
RCS file: /cvs/jinput/plugins/linux/src/native/EventDevice.cpp,v
retrieving revision 1.3
diff -u -r1.3 EventDevice.cpp
--- plugins/linux/src/native/EventDevice.cpp 21 Apr 2004 09:48:54 -0000 1.3
+++ plugins/linux/src/native/EventDevice.cpp 24 Aug 2004 23:15:27 -0000
@@ -190,7 +190,7 @@
sprintf(errorMessage, "Error reading device %s\n", deviceFileName);
perror(errorMessage);
}
- absAxesData
= abs_features.curr_value;
+ absAxesData = abs_features.value;
}
}
@@ -334,9 +334,11 @@
//printf("abs axis %d translates to abs axis %d on this device\n", events.code, axisIndex);
break;
}
+/*
case EV_RST:
// not sure what to do here, doing nothing seems to work 
break;
+*/
case EV_LED:
// reveiced for things like numlock led change
break;
@@ -363,11 +365,11 @@
}
int EventDevice::getAbsAxisMinimum(int axisNumber) {
- return abs_features[axisNumber].min_value;
+ return abs_features[axisNumber].minimum;
}
int EventDevice::getAbsAxisMaximum(int axisNumber) {
- return abs_features[axisNumber].max_value;
+ return abs_features[axisNumber].maximum;
}
int EventDevice::getAbsAxisFuzz(int axisNumber) {
Index: plugins/linux/src/native/eventInterfaceTypes.h
===================================================================
RCS file: /cvs/jinput/plugins/linux/src/native/eventInterfaceTypes.h,v
retrieving revision 1.1
diff -u -r1.1 eventInterfaceTypes.h
--- plugins/linux/src/native/eventInterfaceTypes.h 31 Jul 2003 19:34:46 -0000 1.1
+++ plugins/linux/src/native/eventInterfaceTypes.h 24 Aug 2004 23:15:27 -0000
@@ -13,6 +13,7 @@
uint16_t version;
};
+/*
struct input_absinfo {
int curr_value;
int min_value;
@@ -20,5 +21,6 @@
int fuzz;
int flat;
};
+*/
#endif //eventInterfaceTypes_h
Am I doing something wrong?