|
From: Emily L. <emi...@im...> - 2016-11-16 12:29:25
|
When trying to compile native components for JOGL I hit the following issue:
c.build.newt.windowlib:
[echo] Output lib name = newt
[echo] Compiling newt
[cc] Starting dependency analysis for 2 files.
[cc] 2 files are up to date.
[cc] 0 files to be recompiled from dependency analysis.
[cc] 1 total files to be compiled.
[cc] cc1.exe: warning: command line option '-fno-rtti' is valid for C++/ObjC++ but not for C
[cc] In file included from D:\work_java\jogl\src\newt\native\WindowsEDID.c:51:0:
[cc] D:/opt/msys2/mingw64/x86_64-w64-mingw32/include/SetupApi.h:1879:119: error: unknown type name 'DEVPROPKEY'
[cc] WINSETUPAPI WINBOOL WINAPI SetupDiGetDevicePropertyW(HDEVINFO DeviceInfoSet, PSP_DEVINFO_DATA DeviceInfoData, const DEVPROPKEY *PropertyKey, DEVPROPTYPE *PropertyType, PBYTE PropertyBuffer, DWORD PropertyBufferSize, PDWORD RequiredSize, DWORD Flags);
[cc] ^~~~~~~~~~
[cc] D:/opt/msys2/mingw64/x86_64-w64-mingw32/include/SetupApi.h:1879:144: error: unknown type name 'DEVPROPTYPE'
[cc] WINSETUPAPI WINBOOL WINAPI SetupDiGetDevicePropertyW(HDEVINFO DeviceInfoSet, PSP_DEVINFO_DATA DeviceInfoData, const DEVPROPKEY *PropertyKey, DEVPROPTYPE *PropertyType, PBYTE PropertyBuffer, DWORD PropertyBufferSize, PDWORD RequiredSize, DWORD Flags);
[cc] ^~~~~~~~~~~
[cc] D:/opt/msys2/mingw64/x86_64-w64-mingw32/include/SetupApi.h:1880:116: error: unknown type name 'DEVPROPKEY'
[cc] WINSETUPAPI WINBOOL WINAPI SetupDiGetDevicePropertyKeys(HDEVINFO DeviceInfoSet, PSP_DEVINFO_DATA DeviceInfoData, DEVPROPKEY *PropertyKeyArray, DWORD PropertyKeyCount, PDWORD RequiredPropertyKeyCount, DWORD Flags);
[cc]
I looked into "x86_64-w64-mingw32/include/SetupApi.h" and I see that the required include for DEVPROPKEY (as defined here: https://msdn.microsoft.com/en-us/library/windows/hardware/dn315031(v=vs.85).aspx) is missing.
I added the proper include inside the #if/endif and compilation succeeded.
Here is how it looks after change:
#if _WIN32_WINNT >= 0x0600
#include <Devpropdef.h>
WINSETUPAPI WINBOOL WINAPI SetupDiGetDevicePropertyW(HDEVINFO DeviceInfoSet, PSP_DEVINFO_DATA DeviceInfoData, const DEVPROPKEY *PropertyKey, DEVPROPTYPE *PropertyType, PBYTE PropertyBuffer, DWORD PropertyBufferSize, PDWORD RequiredSize, DWORD Flags);
WINSETUPAPI WINBOOL WINAPI SetupDiGetDevicePropertyKeys(HDEVINFO DeviceInfoSet, PSP_DEVINFO_DATA DeviceInfoData, DEVPROPKEY *PropertyKeyArray, DWORD PropertyKeyCount, PDWORD RequiredPropertyKeyCount, DWORD Flags);
#endif
Could this be added upstream please?
Emily Leiviskä
RnD
M.Sc. Computer Science Engineering
M.Sc. Engineering Applied Physics & Electrical Engineering International
[Beskrivning: Email logo Image Systems2]
Image Systems AB
Snickaregatan 40, 582 26 Linköping, Sweden
Tel +46 (0) 13 200151
http://www.imagesystems.se/
|