Basically, I am finalizing the integration of Asio (non-Boost) into Unreal Engine.
I am encountering error C2039: ‘__faststorefence’: is not a member of ‘FWindowsPlatformMisc’ originating from the include “Async/TaskGraphInterfaces.h(895)” while attempting to package the plugin. The issue appears to be because I am using the AsyncTask function to call the “Broadcast” function of delegates on the game thread, and I need this because I use the asio::thread_pool to create asynchronous tasks outside the game thread.
Includes:
#include "CoreMinimal.h"
#include "Async/Async.h"
#define UI UI_ST
THIRD_PARTY_INCLUDES_START
#include <vector>
#include <random>
#include <map>
#include <cstdint>
#include <algorithm>
#include <iostream>
#if PLATFORM_WINDOWS
#ifdef _WIN32
#define _WIN32_WINNT 0x0A00
#endif
#define WIN32_LEAN_AND_MEAN
#endif
#define ASIO_STANDALONE
#define ASIO_NO_DEPRECATED
#define ASIO_NO_EXCEPTIONS
#include <asio.hpp>
#include <asio/ssl.hpp>
THIRD_PARTY_INCLUDES_END
#undef UI
#include "Commons.generated.h"
error:
C:\Program Files\Epic Games\UE_4.27\Engine\Source\Runtime\Core\Public\Async/TaskGraphInterfaces.h(895): error C2039: ' __faststorefence': não é um membro de 'FWindowsPlatformMisc'
C:\Program Files\Epic Games\UE_4.27\Engine\Source\Runtime\Core\Public\Windows/WindowsPlatformMisc.h(35): note: consulte a declaração de 'FWindowsPlatformMisc'
C:\Program Files\Epic Games\UE_4.27\Engine\Source\Runtime\Core\Public\Async/TaskGraphInterfaces.h(895): note: o contexto de instanciação do modelo (o mais antigo primeiro) é
C:\Program Files\Epic Games\UE_4.27\Engine\Source\Runtime\Core\Public\Async/TaskGraphInterfaces.h(1402): note: consulte a referência à instanciação 'TGraphTask<TFunctionGraphTaskImpl<void (ENamedThreads::Type,const FGraphEventRef &),ESubsequentsMode::TrackSubsequents>>' do modelo da classe que está sendo compilada
C:\Program Files\Epic Games\UE_4.27\Engine\Source\Runtime\Core\Public\Async/TaskGraphInterfaces.h(870): note: ao compilar a função de membro 'void TGraphTask<TFunctionGraphTaskImpl<void (ENamedThreads::Type,const FGraphEventRef &),ESubsequentsMode::TrackSubsequents>>::ExecuteTask(TArray<FBaseGraphTask *,FDefaultAllocator> &,ENamedThreads::Type)' do modelo da classe
[2/4] Module.InternetProtocol.gen.3_of_3.cpp
Detected compiler newer than Visual Studio 2019, please update min version checking in WindowsPlatformCompilerSetup.h
C:\Users\natha\Documents\Unreal Projects\IP4\Package\HostProject\Plugins\InternetProtocol\Source\InternetProtocol\Public\Net/Commons.h(30): warning C4005: '_WIN32_WINNT': redefinição de macro
C:\Users\natha\Documents\Unreal Projects\IP4\Package\HostProject\Plugins\InternetProtocol\Intermediate\Build\Win64\UE4\Development\InternetProtocol\Definitions.h(41): note: ver a definição anterior de "_WIN32_WINNT"
C:\Program Files (x86)\Windows Kits\10\include\10.0.26100.0\um\winnt.h(645): warning C4005: 'TEXT': redefinição de macro
C:\Program Files\Epic Games\UE_4.27\Engine\Source\Runtime\Core\Public\HAL/Platform.h(1085): note: ver a definição anterior de "TEXT"
[3/4] Module.InternetProtocol.gen.1_of_3.cpp
Detected compiler newer than Visual Studio 2019, please update min version checking in WindowsPlatformCompilerSetup.h
C:\Users\natha\Documents\Unreal Projects\IP4\Package\HostProject\Plugins\InternetProtocol\Source\InternetProtocol/Public/Net/Commons.h(30): warning C4005: '_WIN32_WINNT': redefinição de macro
C:\Users\natha\Documents\Unreal Projects\IP4\Package\HostProject\Plugins\InternetProtocol\Intermediate\Build\Win64\UE4\Development\InternetProtocol\Definitions.h(41): note: ver a definição anterior de "_WIN32_WINNT"
C:\Program Files (x86)\Windows Kits\10\include\10.0.26100.0\um\winnt.h(645): warning C4005: 'TEXT': redefinição de macro
C:\Program Files\Epic Games\UE_4.27\Engine\Source\Runtime\Core\Public\HAL/Platform.h(1085): note: ver a definição anterior de "TEXT"
[4/4] Module.InternetProtocol.cpp
Detected compiler newer than Visual Studio 2019, please update min version checking in WindowsPlatformCompilerSetup.h
C:\Users\natha\Documents\Unreal Projects\IP4\Package\HostProject\Plugins\InternetProtocol\Source\InternetProtocol\Public\Net/Commons.h(30): warning C4005: '_WIN32_WINNT': redefinição de macro
C:\Users\natha\Documents\Unreal Projects\IP4\Package\HostProject\Plugins\InternetProtocol\Intermediate\Build\Win64\UE4\Development\InternetProtocol\Definitions.h(41): note: ver a definição anterior de "_WIN32_WINNT"
C:\Program Files (x86)\Windows Kits\10\include\10.0.26100.0\um\winnt.h(645): warning C4005: 'TEXT': redefinição de macro
C:\Program Files\Epic Games\UE_4.27\Engine\Source\Runtime\Core\Public\HAL/Platform.h(1085): note: ver a definição anterior de "TEXT"
C:\Program Files\Epic Games\UE_4.27\Engine\Source\Runtime\Core\Public\Core.h(6): warning: Monolithic headers should not be used by this module. Please change it to explicitly include the headers it needs.
Took 24,052426s to run UnrealBuildTool.exe, ExitCode=6
UnrealBuildTool failed. See log for more details. (C:\Users\natha\AppData\Roaming\Unreal Engine\AutomationTool\Logs\C+Program+Files+Epic+Games+UE_4.27\UBT-UE4Game-Win64-Development.txt)
AutomationTool exiting with ExitCode=6 (6)
BUILD FAILED
Repository: Cesio137/InternetProtocol