Search code examples
c++visual-studioqtbluetoothqnx

How to use Windows SDK in Qt 5.7?


I have been trying to use the Windows SDK inside QT creator with QT 5.7.

I'm trying to use the Bluetooth LE API-s, which are not supported in QT.

I have also installed Visual Studio 2015 for the headers and libs for Windows.Devices.Bluetooth.Advertisement.h

I added to the .pro file

INCLUDEPATH += "C:\Program Files (x86)\Windows Kits\10\Include\10.0.14393.0\winrt"
LIBS += -L"C:\Program Files (x86)\Windows Kits\10\Lib"
LIBS += -L"C:\Program Files (x86)\Microsoft Visual Studio 14.0\VC\lib"

but now when I try to build I get 8000 issues, for example:

C:\Program Files (x86)\Windows Kits\10\Include\10.0.14393.0\winrt\Windows.Foundation.h:9149: error: use of enum 'PropertyType' without previous declaration
         typedef enum PropertyType PropertyType;
                      ^

I tried to install qt addon for visual studio 2015 but it did not show up..

How to get Microsoft SDK working with QT?


Solution

  • I had installed QT with miniGW compiler, but I needed to use the MSVC compiler to make the errors disappear.