My program uses the linux/uinput.h header. This header file is included in the arm64 android ndk standalone toolchain (generated with this command in the android ndk folder: python.exe ./make_standalone_toolchain.py --arch arm64 --install-dir arm64 --deprecated-headers --stl gnustl
), but not in the 32-bit arm one, generated the same way. This is a problem, because I need to use the header. I tried to copy the header across (some research showed that the architecture doen't matter with the uinput header), but then I get this error:
sysroot\usr\include\linux\uinput.h:71:15: error: 'ABS_CNT' undeclared here (not in a function)
__s32 absmax[ABS_CNT];
^
What's going on? Why is the header not included in the 32-bit toolchain, and why is the exact same header file getting an error when copied across?
I worked it out - it's a known bug in the Android NDK r16. I needed to use unified headers and use this flag when compiling: