Userspace XBox/XBox360 Gamepad Driver
- runs in userspace on top of libusb, no kernel recompile required, very easy to get started
- gives you what you would expect from a driver, like a normal joystick device and a event device
- allows you to handle analog-triggers as a single z-axis, as buttons or as seperate axis
- allows you to handle the dpad as buttons or as axis
- allows you to set the LED status of the XBox360 gamepad
- supports rumble
- allows mouse and keyboard emulation
- supports the use of multiple gamepads
License: free
Requirements: libusb, scons, boost, uinput
| Sound: | Play in X: | Play in Console: | Multiplayer: | Network Play: | 3D Acceleration: | Source Available: |
|---|---|---|---|---|---|---|
| no | yes | yes | no | no | no | yes |
Submitted by grumbel on 2008-04-13.

scons: Reading SConscript files ... scons: done reading SConscript files. scons: Building targets ... g++ -o uinput.o -c -g -O0 -Wall uinput.cpp uinput.cpp: In constructor 'uInput::uInput(GamepadType, uInputCfg)': uinput.cpp:45: error: 'strerror' was not declared in this scope uinput.cpp:59: error: 'EXIT_FAILURE' was not declared in this scope uinput.cpp:59: error: 'exit' was not declared in this scope uinput.cpp:74: error: 'EXIT_FAILURE' was not declared in this scope uinput.cpp:74: error: 'exit' was not declared in this scope uinput.cpp: In member function 'void uInput::setup_xbox360_gamepad(GamepadType)': uinput.cpp:148: error: 'memset' was not declared in this scope uinput.cpp:149: error: 'strncpy' was not declared in this scope uinput.cpp: In member function 'void uInput::setup_xbox360_guitar()': uinput.cpp:233: error: 'memset' was not declared in this scope uinput.cpp:234: error: 'strncpy' was not declared in this scope uinput.cpp: In member function 'void uInput::send_button(uint16_t, int32_t)': uinput.cpp:260: error: 'memset' was not declared in this scope uinput.cpp: In member function 'void uInput::send_axis(uint16_t, int32_t)': uinput.cpp:274: error: 'memset' was not declared in this scope scons: *** [uinput.o] Error 1 scons: building terminated because of errors.
uinput.cpp / uinput.h is probably missing the following two lines at the very top (maybe others):
#include <cstdlib>
#include <cstring>
In g++ 4.3 or so the standard header files have been edited to only include other header files that they absolutly depend on. So, for example, the devs could have included "limits" and forgot to include "cstdlib" which happened "automagically" on their machines, but because you are using newer header files, this won't work on your machine.
Please also send an e-mail to the developers to inform them about this error. :-)
scons: Reading SConscript files ... Checking for C++ library X11... yes Checking for C++ library usb... yes Checking for C++ header file boost/thread/thread.hpp... yes Checking for C++ library boost_thread-mt... yes scons: done reading SConscript files. scons: Building targets ... o src/arg_parser.o -c -g -O2 -Wall -ansi -pedantic src/arg_parser.cpp sh: o: command not found o src/command_line_options.o -c -g -O2 -Wall -ansi -pedantic src/command_line_options.cpp sh: o: command not found o src/evdev_helper.o -c -g -O2 -Wall -ansi -pedantic src/evdev_helper.cpp sh: o: command not found o src/firestorm_dual_controller.o -c -g -O2 -Wall -ansi -pedantic src/firestorm_dual_controller.cpp sh: o: command not found o src/force_feedback_handler.o -c -g -O2 -Wall -ansi -pedantic src/force_feedback_handler.cpp sh: o: command not found o src/helper.o -c -g -O2 -Wall -ansi -pedantic src/helper.cpp sh: o: command not found o src/linux_uinput.o -c -g -O2 -Wall -ansi -pedantic src/linux_uinput.cpp sh: o: command not found o src/modifier.o -c -g -O2 -Wall -ansi -pedantic src/modifier.cpp sh: o: command not found o src/pretty_printer.o -c -g -O2 -Wall -ansi -pedantic src/pretty_printer.cpp sh: o: command not found o src/uinput.o -c -g -O2 -Wall -ansi -pedantic src/uinput.cpp sh: o: command not found o src/usb_read_thread.o -c -g -O2 -Wall -ansi -pedantic src/usb_read_thread.cpp sh: o: command not found o src/xbox360_controller.o -c -g -O2 -Wall -ansi -pedantic src/xbox360_controller.cpp sh: o: command not found o src/xbox360_wireless_controller.o -c -g -O2 -Wall -ansi -pedantic src/xbox360_wireless_controller.cpp sh: o: command not found o src/xbox_controller.o -c -g -O2 -Wall -ansi -pedantic src/xbox_controller.cpp sh: o: command not found o src/xboxdrv.o -c -g -O2 -Wall -ansi -pedantic src/xboxdrv.cpp sh: o: command not found o src/xboxmsg.o -c -g -O2 -Wall -ansi -pedantic src/xboxmsg.cpp sh: o: command not found o src/xpad_device.o -c -g -O2 -Wall -ansi -pedantic src/xpad_device.cpp sh: o: command not found o xboxdrv src/xboxdrv.o src/xboxmsg.o src/uinput.o src/arg_parser.o src/pretty_printer.o src/helper.o src/modifier.o src/command_line_options.o src/xbox_controller.o src/xpad_device.o src/xbox360_controller.o src/xbox360_wireless_controller.o src/firestorm_dual_controller.o src/evdev_helper.o src/linux_uinput.o src/usb_read_thread.o src/force_feedback_handler.o -lX11 -lX11 -lusb -lusb -lboost_thread-mt -lboost_thread-mt sh: o: command not found scons: done building targets. >scons (9563) returned '116'
I use RHEL 5.4 on a 686.
Congratulations to Happy Penguin for (apparently) recovering from some downtime.
I'm trying to compile xboxdrv 0.7.3 but Scons simply refuses to work:
>Package libusb-1.0 was not found in the pkg-config search path. >Perhaps you should add the directory containing `libusb-1.0.pc' >to the PKG_CONFIG_PATH environment variable >No package 'libusb-1.0' found
I'm on FC11.
I do have libusb-1.0.pc:
>[root@stefanlinux include]# find / -name libusb-1.0.pc >/usr/local/lib/pkgconfig/libusb-1.0.pc >[root@stefanlinux include]#
and I do have the environment variable PKG_CONFIG_PATH set to this path:
>[root@stefanlinux include]# set | grep PKG_CONFIG >PKG_CONFIG_PATH=/usr/local/lib/pkgconfig >[root@stefanlinux include]#
I can call pkg-config for libusb just fine from the command line, when in any directory:
>[root@stefanlinux include]# pkg-config libusb-1.0 --cflags --libs >-I/usr/local/include/libusb-1.0 -L/usr/local/lib -lusb-1.0 >[root@stefanlinux include]#
E. g. I do have all the requirements, yet scons never finds libusb-1.0.pc which is in /usr/local/lib/pkgconfig where it should be?
How can I get xboxdrv's scons to FIND libusb-1.0.pc??
Thanks!
If anybody's interested, I solved my above problem of scons not finding libusb by doing this:
[root@stefanlinux pkgconfig]# pwd /usr/lib/pkgconfig [root@stefanlinux pkgconfig]# ln -s /usr/local/lib/pkgconfig/libusb-1.0.pc libusb-1.0.pc
After doing this, scons was able to find libusb on my system...!