diff --git a/CMakeLists.txt b/CMakeLists.txt index 425ba02..d21dc43 100755 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -77,7 +77,7 @@ if (WIN32) ) else() # MSVC specific steps - list(APPEND PLATFORM_SPECIFIC_LIBRARIES "delayimp.lib") + list(APPEND PLATFORM_SPECIFIC_LIBRARIES "delayimp.lib" "winmm.lib") # We need to load wpcap add_link_options(/DELAYLOAD:wpcap.dll) diff --git a/Sources/UserInterface/AboutWindow.cpp b/Sources/UserInterface/AboutWindow.cpp index 33643c5..b9dcc66 100644 --- a/Sources/UserInterface/AboutWindow.cpp +++ b/Sources/UserInterface/AboutWindow.cpp @@ -1,4 +1,5 @@ /* Copyright (c) 2021 [Rick de Bondt] - AboutWindow.cpp */ +#include #include "UserInterface/AboutWindow.h" diff --git a/Sources/UserInterface/HUDWindow.cpp b/Sources/UserInterface/HUDWindow.cpp index 6c5bac6..f7da6ce 100644 --- a/Sources/UserInterface/HUDWindow.cpp +++ b/Sources/UserInterface/HUDWindow.cpp @@ -1,4 +1,5 @@ /* Copyright (c) 2021 [Rick de Bondt] - HUDWindow.cpp */ +#include #include "UserInterface/HUDWindow.h" diff --git a/Sources/WifiInterfaceWindows.cpp b/Sources/WifiInterfaceWindows.cpp index eee3de8..2f08f9c 100644 --- a/Sources/WifiInterfaceWindows.cpp +++ b/Sources/WifiInterfaceWindows.cpp @@ -18,6 +18,12 @@ #define UNICODE #endif +#ifndef _MSC_VER +#define STDCALL __attribute__((stdcall)) +#else +#define STDCALL __stdcall +#endif + // available network flags #define WLAN_AVAILABLE_NETWORK_CONNECTED 0x00000001 // This network is currently connected #define WLAN_AVAILABLE_NETWORK_HAS_PROFILE 0x00000002 // There is a profile for this network @@ -105,7 +111,7 @@ static std::wstring GenerateXML(const std::wstring& aSSID) return lFirst + aSSID + lSecond; } -static void __attribute__((stdcall)) WlanCallback(WLAN_NOTIFICATION_DATA* aScanNotificationData, PVOID aContext) +static void STDCALL WlanCallback(WLAN_NOTIFICATION_DATA* aScanNotificationData, PVOID aContext) { // Get the data from my struct. If it's null, nothing to do auto* lCallbackInfo = static_cast(aContext);