[jbliesener@jb-desktop2 linux]$ cd ../..
[jbliesener@jb-desktop2 ty]$ mkdir -p build/win32 && cd build/win32
[jbliesener@jb-desktop2 win32]$ cmake -DCMAKE_TOOLCHAIN_FILE=../../contrib/cmake/i686-w64-mingw32.cmake ../..
-- The C compiler identification is GNU 4.9.1
-- Check for working C compiler: /usr/bin/i686-w64-mingw32-gcc
-- Check for working C compiler: /usr/bin/i686-w64-mingw32-gcc -- works
-- Detecting C compiler ABI info
-- Detecting C compiler ABI info - done
-- Looking for include file pthread.h
-- Looking for include file pthread.h - found
-- Looking for pthread_create
-- Looking for pthread_create - found
-- Found Threads: TRUE
-- Looking for stpcpy
-- Looking for stpcpy - not found
-- Looking for strndup
-- Looking for strndup - not found
-- Looking for asprintf
-- Looking for asprintf - found
-- Looking for getdelim
-- Looking for getdelim - not found
-- Looking for getline
-- Looking for getline - not found
-- Configuring done
-- Generating done
-- Build files have been written to: /home/jbliesener/src/ty/build/win32
[jbliesener@jb-desktop2 win32]$ make
Scanning dependencies of target ty
[ 3%] Building C object CMakeFiles/ty.dir/src/board.c.obj
[ 6%] Building C object CMakeFiles/ty.dir/src/board_teensy.c.obj
[ 9%] Building C object CMakeFiles/ty.dir/src/common.c.obj
[ 12%] Building C object CMakeFiles/ty.dir/src/compat.c.obj
[ 16%] Building C object CMakeFiles/ty.dir/src/device.c.obj
[ 19%] Building C object CMakeFiles/ty.dir/src/firmware.c.obj
[ 22%] Building C object CMakeFiles/ty.dir/src/firmware_ihex.c.obj
[ 25%] Building C object CMakeFiles/ty.dir/src/htable.c.obj
[ 29%] Building C object CMakeFiles/ty.dir/src/ini.c.obj
[ 32%] Building C object CMakeFiles/ty.dir/src/system.c.obj
[ 35%] Building C object CMakeFiles/ty.dir/src/process_win32.c.obj
[ 38%] Building C object CMakeFiles/ty.dir/src/system_win32.c.obj
[ 41%] Building C object CMakeFiles/ty.dir/src/device_win32.c.obj
In file included from /home/jbliesener/src/ty/src/device_win32.c:26:0:
/usr/i686-w64-mingw32/sys-root/mingw/include/hidpi.h:52:3: error: unknown type name 'USAGE'
USAGE Usage;
^
/usr/i686-w64-mingw32/sys-root/mingw/include/hidpi.h:53:3: error: unknown type name 'USAGE'
USAGE UsagePage;
^
/usr/i686-w64-mingw32/sys-root/mingw/include/hidpi.h:57:3: error: unknown type name 'USAGE'
USAGE UsagePage;
^
/usr/i686-w64-mingw32/sys-root/mingw/include/hidpi.h:62:3: error: unknown type name 'USAGE'
USAGE LinkUsage;
^
/usr/i686-w64-mingw32/sys-root/mingw/include/hidpi.h:63:3: error: unknown type name 'USAGE'
USAGE LinkUsagePage;
^
/usr/i686-w64-mingw32/sys-root/mingw/include/hidpi.h:71:7: error: unknown type name 'USAGE'
USAGE UsageMin, UsageMax;
^
/usr/i686-w64-mingw32/sys-root/mingw/include/hidpi.h:77:7: error: unknown type name 'USAGE'
USAGE Usage, Reserved1;
^
/usr/i686-w64-mingw32/sys-root/mingw/include/hidpi.h:86:3: error: unknown type name 'USAGE'
USAGE UsagePage;
^
/usr/i686-w64-mingw32/sys-root/mingw/include/hidpi.h:91:3: error: unknown type name 'USAGE'
USAGE LinkUsage;
^
/usr/i686-w64-mingw32/sys-root/mingw/include/hidpi.h:92:3: error: unknown type name 'USAGE'
USAGE LinkUsagePage;
^
/usr/i686-w64-mingw32/sys-root/mingw/include/hidpi.h:108:7: error: unknown type name 'USAGE'
USAGE UsageMin, UsageMax;
^
/usr/i686-w64-mingw32/sys-root/mingw/include/hidpi.h:114:7: error: unknown type name 'USAGE'
USAGE Usage, Reserved1;
^
/usr/i686-w64-mingw32/sys-root/mingw/include/hidpi.h:123:3: error: unknown type name 'USAGE'
USAGE LinkUsage;
^
/usr/i686-w64-mingw32/sys-root/mingw/include/hidpi.h:124:3: error: unknown type name 'USAGE'
USAGE LinkUsagePage;
^
/usr/i686-w64-mingw32/sys-root/mingw/include/hidpi.h:136:3: error: unknown type name 'USAGE'
USAGE Usage;
^
/usr/i686-w64-mingw32/sys-root/mingw/include/hidpi.h:137:3: error: unknown type name 'USAGE'
USAGE UsagePage;
^
/usr/i686-w64-mingw32/sys-root/mingw/include/hidpi.h:203:16: error: expected ',' or ';' before 'HidP_GetCaps'
NTSTATUS NTAPI HidP_GetCaps (PHIDP_PREPARSED_DATA PreparsedData, PHIDP_CAPS Capabilities);
^
/usr/i686-w64-mingw32/sys-root/mingw/include/hidpi.h:204:16: error: expected ',' or ';' before 'HidP_GetLinkCollectionNodes'
NTSTATUS NTAPI HidP_GetLinkCollectionNodes (PHIDP_LINK_COLLECTION_NODE LinkCollectionNodes, PULONG LinkCollectionNodesLength, PHIDP_PREPARSED_DATA PreparsedData);
^
In file included from /home/jbliesener/src/ty/src/device_win32.c:26:0:
/usr/i686-w64-mingw32/sys-root/mingw/include/hidpi.h:205:16: error: expected ',' or ';' before 'HidP_GetSpecificButtonCaps'
NTSTATUS NTAPI HidP_GetSpecificButtonCaps (HIDP_REPORT_TYPE ReportType, USAGE UsagePage, USHORT LinkCollection, USAGE Usage, PHIDP_BUTTON_CAPS ButtonCaps, PUSHORT ButtonCapsLength, PHIDP_PREPARSED_DATA PreparsedData);
^
/usr/i686-w64-mingw32/sys-root/mingw/include/hidpi.h:206:16: error: expected ',' or ';' before 'HidP_GetButtonCaps'
NTSTATUS NTAPI HidP_GetButtonCaps (HIDP_REPORT_TYPE ReportType, PHIDP_BUTTON_CAPS ButtonCaps, PUSHORT ButtonCapsLength, PHIDP_PREPARSED_DATA PreparsedData);
^
/usr/i686-w64-mingw32/sys-root/mingw/include/hidpi.h:207:16: error: expected ',' or ';' before 'HidP_GetSpecificValueCaps'
NTSTATUS NTAPI HidP_GetSpecificValueCaps (HIDP_REPORT_TYPE ReportType, USAGE UsagePage, USHORT LinkCollection, USAGE Usage, PHIDP_VALUE_CAPS ValueCaps, PUSHORT ValueCapsLength, PHIDP_PREPARSED_DATA PreparsedData);
^
/usr/i686-w64-mingw32/sys-root/mingw/include/hidpi.h:208:16: error: expected ',' or ';' before 'HidP_GetValueCaps'
NTSTATUS NTAPI HidP_GetValueCaps (HIDP_REPORT_TYPE ReportType, PHIDP_VALUE_CAPS ValueCaps, PUSHORT ValueCapsLength, PHIDP_PREPARSED_DATA PreparsedData);
^
/usr/i686-w64-mingw32/sys-root/mingw/include/hidpi.h:209:16: error: expected ',' or ';' before 'HidP_GetExtendedAttributes'
NTSTATUS NTAPI HidP_GetExtendedAttributes (HIDP_REPORT_TYPE ReportType, USHORT DataIndex, PHIDP_PREPARSED_DATA PreparsedData, PHIDP_EXTENDED_ATTRIBUTES Attributes, PULONG LengthAttributes);
^
/usr/i686-w64-mingw32/sys-root/mingw/include/hidpi.h:210:16: error: expected ',' or ';' before 'HidP_InitializeReportForID'
NTSTATUS NTAPI HidP_InitializeReportForID (HIDP_REPORT_TYPE ReportType, UCHAR ReportID, PHIDP_PREPARSED_DATA PreparsedData, PCHAR Report, ULONG ReportLength);
^
/usr/i686-w64-mingw32/sys-root/mingw/include/hidpi.h:211:16: error: expected ',' or ';' before 'HidP_SetData'
NTSTATUS NTAPI HidP_SetData (HIDP_REPORT_TYPE ReportType, PHIDP_DATA DataList, PULONG DataLength, PHIDP_PREPARSED_DATA PreparsedData, PCHAR Report, ULONG ReportLength);
^
/usr/i686-w64-mingw32/sys-root/mingw/include/hidpi.h:212:16: error: expected ',' or ';' before 'HidP_GetData'
NTSTATUS NTAPI HidP_GetData (HIDP_REPORT_TYPE ReportType, PHIDP_DATA DataList, PULONG DataLength, PHIDP_PREPARSED_DATA PreparsedData, PCHAR Report, ULONG ReportLength);
^
/usr/i686-w64-mingw32/sys-root/mingw/include/hidpi.h:214:16: error: expected ',' or ';' before 'HidP_SetUsages'
NTSTATUS NTAPI HidP_SetUsages (HIDP_REPORT_TYPE ReportType, USAGE UsagePage, USHORT LinkCollection, PUSAGE UsageList, PULONG UsageLength, PHIDP_PREPARSED_DATA PreparsedData, PCHAR Report, ULONG ReportLength);
^
/usr/i686-w64-mingw32/sys-root/mingw/include/hidpi.h:215:16: error: expected ',' or ';' before 'HidP_UnsetUsages'
NTSTATUS NTAPI HidP_UnsetUsages (HIDP_REPORT_TYPE ReportType, USAGE UsagePage, USHORT LinkCollection, PUSAGE UsageList, PULONG UsageLength, PHIDP_PREPARSED_DATA PreparsedData, PCHAR Report, ULONG ReportLength);
^
/usr/i686-w64-mingw32/sys-root/mingw/include/hidpi.h:216:16: error: expected ',' or ';' before 'HidP_GetUsages'
NTSTATUS NTAPI HidP_GetUsages (HIDP_REPORT_TYPE ReportType, USAGE UsagePage, USHORT LinkCollection, PUSAGE UsageList, PULONG UsageLength, PHIDP_PREPARSED_DATA PreparsedData, PCHAR Report, ULONG ReportLength);
^
/usr/i686-w64-mingw32/sys-root/mingw/include/hidpi.h:217:16: error: expected ',' or ';' before 'HidP_GetUsagesEx'
NTSTATUS NTAPI HidP_GetUsagesEx (HIDP_REPORT_TYPE ReportType, USHORT LinkCollection, PUSAGE_AND_PAGE ButtonList, ULONG *UsageLength, PHIDP_PREPARSED_DATA PreparsedData, PCHAR Report, ULONG ReportLength);
^
/usr/i686-w64-mingw32/sys-root/mingw/include/hidpi.h:218:67: error: unknown type name 'USAGE'
ULONG NTAPI HidP_MaxUsageListLength (HIDP_REPORT_TYPE ReportType, USAGE UsagePage, PHIDP_PREPARSED_DATA PreparsedData);
^
/usr/i686-w64-mingw32/sys-root/mingw/include/hidpi.h:219:16: error: expected ',' or ';' before 'HidP_SetUsageValue'
NTSTATUS NTAPI HidP_SetUsageValue (HIDP_REPORT_TYPE ReportType, USAGE UsagePage, USHORT LinkCollection, USAGE Usage, ULONG UsageValue, PHIDP_PREPARSED_DATA PreparsedData, PCHAR Report, ULONG ReportLength);
^
/usr/i686-w64-mingw32/sys-root/mingw/include/hidpi.h:220:16: error: expected ',' or ';' before 'HidP_SetScaledUsageValue'
NTSTATUS NTAPI HidP_SetScaledUsageValue (HIDP_REPORT_TYPE ReportType, USAGE UsagePage, USHORT LinkCollection, USAGE Usage, LONG UsageValue, PHIDP_PREPARSED_DATA PreparsedData, PCHAR Report, ULONG ReportLength);
^
/usr/i686-w64-mingw32/sys-root/mingw/include/hidpi.h:221:16: error: expected ',' or ';' before 'HidP_SetUsageValueArray'
NTSTATUS NTAPI HidP_SetUsageValueArray (HIDP_REPORT_TYPE ReportType, USAGE UsagePage, USHORT LinkCollection, USAGE Usage, PCHAR UsageValue, USHORT UsageValueByteLength, PHIDP_PREPARSED_DATA PreparsedData, PCHAR Report, ULONG ReportLength);
^
/usr/i686-w64-mingw32/sys-root/mingw/include/hidpi.h:222:16: error: expected ',' or ';' before 'HidP_GetUsageValue'
NTSTATUS NTAPI HidP_GetUsageValue (HIDP_REPORT_TYPE ReportType, USAGE UsagePage, USHORT LinkCollection, USAGE Usage, PULONG UsageValue, PHIDP_PREPARSED_DATA PreparsedData, PCHAR Report, ULONG ReportLength);
^
/usr/i686-w64-mingw32/sys-root/mingw/include/hidpi.h:223:16: error: expected ',' or ';' before 'HidP_GetScaledUsageValue'
NTSTATUS NTAPI HidP_GetScaledUsageValue (HIDP_REPORT_TYPE ReportType, USAGE UsagePage, USHORT LinkCollection, USAGE Usage, PLONG UsageValue, PHIDP_PREPARSED_DATA PreparsedData, PCHAR Report, ULONG ReportLength);
^
/usr/i686-w64-mingw32/sys-root/mingw/include/hidpi.h:224:16: error: expected ',' or ';' before 'HidP_GetUsageValueArray'
NTSTATUS NTAPI HidP_GetUsageValueArray (HIDP_REPORT_TYPE ReportType, USAGE UsagePage, USHORT LinkCollection, USAGE Usage, PCHAR UsageValue, USHORT UsageValueByteLength, PHIDP_PREPARSED_DATA PreparsedData, PCHAR Report, ULONG ReportLength);
^
/usr/i686-w64-mingw32/sys-root/mingw/include/hidpi.h:225:16: error: expected ',' or ';' before 'HidP_UsageListDifference'
NTSTATUS NTAPI HidP_UsageListDifference (PUSAGE PreviousUsageList, PUSAGE CurrentUsageList, PUSAGE BreakUsageList, PUSAGE MakeUsageList, ULONG UsageListLength);
^
/usr/i686-w64-mingw32/sys-root/mingw/include/hidpi.h:226:16: error: expected ',' or ';' before 'HidP_UsageAndPageListDifference'
NTSTATUS NTAPI HidP_UsageAndPageListDifference (PUSAGE_AND_PAGE PreviousUsageList, PUSAGE_AND_PAGE CurrentUsageList, PUSAGE_AND_PAGE BreakUsageList, PUSAGE_AND_PAGE MakeUsageList, ULONG UsageListLength);
^
/usr/i686-w64-mingw32/sys-root/mingw/include/hidpi.h:227:16: error: expected ',' or ';' before 'HidP_TranslateUsageAndPagesToI8042ScanCodes'
NTSTATUS NTAPI HidP_TranslateUsageAndPagesToI8042ScanCodes (PUSAGE_AND_PAGE ChangedUsageList, ULONG UsageListLength, HIDP_KEYBOARD_DIRECTION KeyAction, PHIDP_KEYBOARD_MODIFIER_STATE ModifierState, PHIDP_INSERT_SCANCODES InsertCodesProcedure, PVOID InsertCodesContext);
^
In file included from /home/jbliesener/src/ty/src/device_win32.c:26:0:
/usr/i686-w64-mingw32/sys-root/mingw/include/hidpi.h:228:16: error: expected ',' or ';' before 'HidP_TranslateUsagesToI8042ScanCodes'
NTSTATUS NTAPI HidP_TranslateUsagesToI8042ScanCodes (PUSAGE ChangedUsageList, ULONG UsageListLength, HIDP_KEYBOARD_DIRECTION KeyAction, PHIDP_KEYBOARD_MODIFIER_STATE ModifierState, PHIDP_INSERT_SCANCODES InsertCodesProcedure, PVOID InsertCodesContext);
^
In file included from /home/jbliesener/src/ty/src/device_win32.c:27:0:
/usr/i686-w64-mingw32/sys-root/mingw/include/hidsdi.h:31:14: error: 'NTSTATUS' redeclared as different kind of symbol
typedef LONG NTSTATUS;
^
In file included from /home/jbliesener/src/ty/src/device_win32.c:26:0:
/usr/i686-w64-mingw32/sys-root/mingw/include/hidpi.h:228:1: note: previous declaration of 'NTSTATUS' was here
NTSTATUS NTAPI HidP_TranslateUsagesToI8042ScanCodes (PUSAGE ChangedUsageList, ULONG UsageListLength, HIDP_KEYBOARD_DIRECTION KeyAction, PHIDP_KEYBOARD_MODIFIER_STATE ModifierState, PHIDP_INSERT_SCANCODES InsertCodesProcedure, PVOID InsertCodesContext);
^
/home/jbliesener/src/ty/src/device_win32.c:84:8: error: expected '=', ',', ';', 'asm' or '__attribute__' before 'void'
HIDAPI void NTAPI HidD_GetHidGuid(LPGUID HidGuid);
^
/home/jbliesener/src/ty/src/device_win32.c:85:1: error: unknown type name 'HIDAPI'
HIDAPI BOOLEAN NTAPI HidD_GetSerialNumberString(HANDLE device, PVOID buffer, ULONG buffer_len);
^
/home/jbliesener/src/ty/src/device_win32.c:85:1: warning: '__stdcall__' attribute only applies to function types [-Wattributes]
/home/jbliesener/src/ty/src/device_win32.c:85:8: error: 'BOOLEAN' redeclared as different kind of symbol
HIDAPI BOOLEAN NTAPI HidD_GetSerialNumberString(HANDLE device, PVOID buffer, ULONG buffer_len);
^
In file included from /usr/i686-w64-mingw32/sys-root/mingw/include/combaseapi.h:153:0,
from /usr/i686-w64-mingw32/sys-root/mingw/include/objbase.h:14,
from /usr/i686-w64-mingw32/sys-root/mingw/include/ole2.h:17,
from /usr/i686-w64-mingw32/sys-root/mingw/include/oledlg.h:26,
from /usr/i686-w64-mingw32/sys-root/mingw/include/setupapi.h:27,
from /home/jbliesener/src/ty/src/device_win32.c:29:
/usr/i686-w64-mingw32/sys-root/mingw/include/wtypesbase.h:376:17: note: previous declaration of 'BOOLEAN' was here
typedef boolean BOOLEAN;
^
/home/jbliesener/src/ty/src/device_win32.c:85:22: error: expected ',' or ';' before 'HidD_GetSerialNumberString'
HIDAPI BOOLEAN NTAPI HidD_GetSerialNumberString(HANDLE device, PVOID buffer, ULONG buffer_len);
^
/home/jbliesener/src/ty/src/device_win32.c:86:1: error: unknown type name 'HIDAPI'
HIDAPI BOOLEAN NTAPI HidD_GetPreparsedData(HANDLE HidDeviceObject, PHIDP_PREPARSED_DATA *PreparsedData);
^
/home/jbliesener/src/ty/src/device_win32.c:86:1: warning: '__stdcall__' attribute only applies to function types [-Wattributes]
/home/jbliesener/src/ty/src/device_win32.c:86:22: error: expected ',' or ';' before 'HidD_GetPreparsedData'
HIDAPI BOOLEAN NTAPI HidD_GetPreparsedData(HANDLE HidDeviceObject, PHIDP_PREPARSED_DATA *PreparsedData);
^
/home/jbliesener/src/ty/src/device_win32.c:87:1: error: unknown type name 'HIDAPI'
HIDAPI BOOLEAN NTAPI HidD_FreePreparsedData(PHIDP_PREPARSED_DATA PreparsedData);
^
/home/jbliesener/src/ty/src/device_win32.c:87:1: warning: '__stdcall__' attribute only applies to function types [-Wattributes]
/home/jbliesener/src/ty/src/device_win32.c:87:22: error: expected ',' or ';' before 'HidD_FreePreparsedData'
HIDAPI BOOLEAN NTAPI HidD_FreePreparsedData(PHIDP_PREPARSED_DATA PreparsedData);
^
/home/jbliesener/src/ty/src/device_win32.c: In function 'ty_hid_parse_descriptor':
/home/jbliesener/src/ty/src/device_win32.c:971:5: warning: implicit declaration of function 'HidP_GetCaps' [-Wimplicit-function-declaration]
ret = HidP_GetCaps(pp, &caps);
^
/home/jbliesener/src/ty/src/device_win32.c:976:19: warning: conversion to 'uint16_t' from 'int' may alter its value [-Wconversion]
desc->usage = caps.Usage;
^
/home/jbliesener/src/ty/src/device_win32.c:977:24: warning: conversion to 'uint16_t' from 'int' may alter its value [-Wconversion]
desc->usage_page = caps.UsagePage;
^
CMakeFiles/ty.dir/build.make:343: recipe for target 'CMakeFiles/ty.dir/src/device_win32.c.obj' failed
make[2]: *** [CMakeFiles/ty.dir/src/device_win32.c.obj] Error 1
CMakeFiles/Makefile2:60: recipe for target 'CMakeFiles/ty.dir/all' failed
make[1]: *** [CMakeFiles/ty.dir/all] Error 2
Makefile:117: recipe for target 'all' failed
make: *** [all] Error 2
This is Fedora 21 with the latest Mingw version installed. I also downloaded and installed the hidapi package: