错误:'uint8_t'尚未声明

时间:2009-12-28 18:34:45

标签: linux gcc compilation opensuse xbox360

我正在尝试使用xbox360控制器作为openSUSE 11.2中的操纵杆。在尝试编译xboxdrv(http://pingus.seul.org/~grumbel/xboxdrv/)时,我收到以下错误:

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:由于错误导致建筑物终止。

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

1 个答案:

答案 0 :(得分:6)

编辑src / xbox_controller.hpp,向其添加缺少的#include <stdint.h>(在开头附近)。