2009-12-28 294 views
1

我试图在openSUSE 11.2中使用xbox360控制器作为游戏杆。当试图编译xboxdrv(http://pingus.seul.org/~grumbel/xboxdrv/)我得到以下错误:错误:'uint8_t'尚未声明

g++ -o src/xbox_controller.o -c -g -O2 -Wall -ansi -pedantic src/xbox_controller.cpp 
In file included from src/xbox_controller.hpp:23, 
       from src/xbox_controller.cpp:24: 
src/xbox_generic_controller.hpp:30: error: 'uint8_t' has not been declared 
src/xbox_generic_controller.hpp:30: error: 'uint8_t' has not been declared 
src/xbox_generic_controller.hpp:31: error: 'uint8_t' has not been declared 
In file included from src/xbox_controller.cpp:24: 
src/xbox_controller.hpp:38: error: 'uint8_t' has not been declared 
src/xbox_controller.hpp:38: error: 'uint8_t' has not been declared 
src/xbox_controller.hpp:39: error: 'uint8_t' has not been declared 
src/xbox_controller.cpp:54: error: variable or field 'set_rumble' declared void 
src/xbox_controller.cpp:54: error: 'uint8_t' was not declared in this scope 
src/xbox_controller.cpp:54: error: 'uint8_t' was not declared in this scope 
scons: *** [src/xbox_controller.o] Error 1 

scons的:建筑由于错误而终止。

任何想法如何解决这一问题?

+0

你应该在SO上发布。 – ephilip 2009-12-28 18:37:04

+0

但实际上并没有发布;)当足够高的代表用户/主持人投票支持迁移时,它会自动迁移。 – ChrisF 2009-12-28 18:47:33

+0

忘了那个...对不起。 – ephilip 2009-12-28 18:54:02

回答

5

编辑src/xbox_controller.hpp,将缺少的#include <stdint.h>添加到它(某处接近开始处)。