1 Oct 2009 09:26
Re: Using windows.h with mingw and Qt
Hello, > Sounds like a third party is repackaging the MinGW toolchain. > If it works, great. But if you run into problems, try building > a simple self-contained test case at the command line (not in > an IDE) first. That way, if it doesn't work, you can copy and > paste the exact commands here, and we'll be able to figure out > how to fix it. Ok, I wrote the following attached test program. It is based on http://msdn.microsoft.com/en-us/library/ms645598(VS.85).aspx This page tells me "Declared in Winuser.h, include Windows.h". My first try was only including windows.h, the second also including winuser.h, the behaviour was in both cases the same. My Path variable looks like follows: C:\Programme\MiKTeX 2.7\miktex\bin;%SystemRoot%\system32;%SystemRoot%;%SystemRoot%\System32\Wbem;C:\Programme\Intel\WiFi\bin\;C:\Programme\ATI Technologies\ATI.ACE\Core-Static;c:\Programme\Gemeinsame Dateien\Lenovo;C:\Programme\Gemeinsame Dateien\Roxio Shared\10.0\DLLShared\;C:\Programme\Gemeinsame Dateien\Roxio Shared\DLLShared\;C:\Programme\Gemeinsame Dateien\Roxio Shared\DLLShared\;C:\Programme\Gemeinsame Dateien\Roxio Shared\10.0\DLLShared\;C:\Programme\ThinkPad\ConnectUtilities;C:\Programme\Lenovo\Client Security Solution;c:\Programme\Microsoft SQL Server\90\Tools\binn\;C:\Qt\2009.03\qt\bin;C:\Programme\SlikSvn\bin\;C:\MinGW\bin\;\;C:\Programme\MySQLServer51\bin;C:\Programme\util;C:\Programme\Bakefile;c:\Programme\Microsoft SQL Server\100\Tools\Binn\;c:\Programme\Microsoft SQL Server\ 100\DTS\Binn\ Now I try to compile it. I get the following error messages:(Continue reading)
at [l3252 of my distribution] of winuser.h it says
#if (_WIN32_WINNT >= 0x0501)
so you need to
#define _WIN32_WINNT 0x0501
then
#include <windows.h>
to properly include the typedef of RAWINPUTDEVICELIST
Best
Mark
RSS Feed