thejinchao / turbolink

TurboLink is an unreal engine plugin enables Google gRPC work with Unreal Engine using C++ and Blueprint
MIT License
129 stars 32 forks source link

5.4 Compile Warnings #45

Open Edstub207 opened 1 month ago

Edstub207 commented 1 month ago

Hello,

As of 5.4, there is the following compile warning:

11>EXEC: Warning : do not include Windows/PreWindowsApi.h directly. Use Windows/WindowsHWrapper.h or Windows/AllowWindowsPlatformTypes.h instead

I believe this stems from TurboLinkGrpcModule.cpp line 14

Unsure which is the correct include to use for Turbolink

moonbusmike commented 1 month ago

Try this:

if PLATFORM_WINDOWS

if defined(WINDOWS_H_WRAPPER_GUARD)

error WINDOWS_H_WRAPPER_GUARD already defined

endif

define WINDOWS_H_WRAPPER_GUARD

include "Windows/PreWindowsApi.h"

endif

include "grpc/grpc.h"

include "grpc/support/log.h"

include "google/protobuf/descriptor_database.h"

if PLATFORM_WINDOWS

include "Windows/PostWindowsApi.h"

undef WINDOWS_H_WRAPPER_GUARD

endif

Edstub207 commented 1 month ago

@moonbusmike Sadly that does not solve the compiler warnings.