我對Windows SDK有問題。
有 .h 頭檔案。此檔案中宣告的類如下所示:
namespace ABI {
namespace Windows {
namespace Devices {
namespace Bluetooth {
namespace Advertisement {
class BluetoothLEAdvertisementPublisher;
} /*Advertisement*/
} /*Bluetooth*/
} /*Devices*/
} /*Windows*/
}
當我想創建類時,編譯器會引發錯誤“分配不完整型別”。
BluetoothLEAdvertisementPublisher* x = new BluetoothLEAdvertisementPublisher();
到底是怎么回事。我應該如何使用這個?我有 Windows 10、C 11 和 mingw 編譯器。
uj5u.com熱心網友回復:
BluetoothLEAdvertisementPublisher附帶 WinRT,而不是 MinGW 提供的 Win32 API。
所以你不可能用 MinGW/MinGW-w64 編譯它,你應該用 MSVC 來嘗試。
轉載請註明出處,本文鏈接:https://www.uj5u.com/gongcheng/518626.html
標籤:C 视窗uwp明威
