我在一个 Raspberry Pi 2 B 上使用 Raspbian,它带有一个从源代码构建的 libusb(如果你好奇的话,版本 1.0.18)。我正在尝试在 Pi 上构建这个程序,但它给出了以下错误:
cc -c -o wii-u-gc-adapter.o wii-u-gc-adapter.c -Wall -Wextra -pedantic -Wno-format -std=c99 -I/usr/local/include/libusb-1.0 -O2
wii-u-gc-adapter.c:44:4: error: ‘BTN_SOUTH’ undeclared here (not in a function)
wii-u-gc-adapter.c:45:4: error: ‘BTN_WEST’ undeclared here (not in a function)
wii-u-gc-adapter.c:46:4: error: ‘BTN_EAST’ undeclared here (not in a function)
wii-u-gc-adapter.c:47:4: error: ‘BTN_NORTH’ undeclared here (not in a function)
wii-u-gc-adapter.c:48:4: error: ‘BTN_DPAD_LEFT’ undeclared here (not in a function)
wii-u-gc-adapter.c:49:4: error: ‘BTN_DPAD_RIGHT’ undeclared here (not in a function)
wii-u-gc-adapter.c:50:4: error: ‘BTN_DPAD_DOWN’ undeclared here (not in a function)
wii-u-gc-adapter.c:51:4: error: ‘BTN_DPAD_UP’ undeclared here (not in a function)
wii-u-gc-adapter.c: In function ‘handle_payload’:
wii-u-gc-adapter.c:367:23: warning: missing initializer [-Wmissing-field-initializers]
wii-u-gc-adapter.c:367:23: warning: (near initialization for ‘upload.retval’) [-Wmissing-field-initializers]
wii-u-gc-adapter.c:386:23: warning: missing initializer [-Wmissing-field-initializers]
wii-u-gc-adapter.c:386:23: warning: (near initialization for ‘erase.retval’) [-Wmissing-field-initializers]
wii-u-gc-adapter.c: In function ‘adapter_thread’:
wii-u-gc-adapter.c:421:14: warning: missing initializer [-Wmissing-field-initializers]
wii-u-gc-adapter.c:421:14: warning: (near initialization for ‘current_time.tv_nsec’) [-Wmissing-field-initializers]
Makefile:16: recipe for target 'wii-u-gc-adapter.o' failed
make: *** [wii-u-gc-adapter.o] Error 1
如果您需要任何其他信息,我会提供。
编辑:还添加了make
详细信息的顶行。