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

Compile fails when disable Unity build #9

Closed ZezhongWang closed 1 year ago

ZezhongWang commented 1 year ago

if I disable unity build for Turbolink plugin. There will be compiling error.

    public TurboLinkGrpc(ReadOnlyTargetRules Target) : base(Target)
    {
        DefaultBuildSettings = BuildSettingsVersion.Latest;
        PCHUsage = ModuleRules.PCHUsageMode.UseExplicitOrSharedPCHs;
        TurboLinkPlatformInstance = GetTurboLinkPlatformInstance(Target);
        bUseUnity = false;
        PublicDependencyModuleNames.AddRange(
            new string[]
            {
                "Core"
            }
        );

Errors

  memory(3089): [C2027] use of undefined type 'grpc::ClientAsyncReaderWriter<Greeter::WatchRequest,Greeter::NowResponse>'
  GreeterMarshaling.h(23): [C2027] see declaration of 'grpc::ClientAsyncReaderWriter<Greeter::WatchRequest,Greeter::NowResponse>'
  memory(3088): [C2027] while compiling class template member function 'void std::default_delete<T>::operator ()(_Ty *) noexcept const'
  memory(3198): [C2027] see reference to function template instantiation 'void std::default_delete<T>::operator ()(_Ty *) noexcept const' being compiled
  memory(3125): [C2027] see reference to class template instantiation 'std::default_delete<T>' being compiled
  TurboLinkGrpcContext.h(69): [C2027] see reference to class template instantiation 'std::unique_ptr<T,std::default_delete<T>>' being compiled
  TurboLinkGrpcContext.h(196): [C2027] see reference to class template instantiation 'TGrpcContext<T,R>' being compiled
  GreeterContext.h(33): [C2027] see reference to class template instantiation 'GrpcContext_Stream_Stream<TimeService_Watch_ReaderWriter,Greeter::NowResponse,Greeter::WatchRequest>' being compiled
  memory(3089): [C2338] can't delete an incomplete type
  memory(3090): [C4150] deletion of pointer to incomplete type 'grpc::ClientAsyncReaderWriter<Greeter::WatchRequest,Greeter::NowResponse>'; no destructor called
  GreeterMarshaling.h(23): [C4150] see declaration of 'grpc::ClientAsyncReaderWriter<Greeter::WatchRequest,Greeter::NowResponse>'
  Platform.h(1148): [C4005] see previous definition of 'TEXT'
  Platform.h(1148): [C4005] see previous definition of 'TEXT'
  Platform.h(1148): [C4005] see previous definition of 'TEXT'
  Platform.h(1148): [C4005] see previous definition of 'TEXT'
  Platform.h(1148): [C4005] see previous definition of 'TEXT'
  Platform.h(1148): [C4005] see previous definition of 'TEXT'
  Platform.h(1148): [C4005] see previous definition of 'TEXT'
  Platform.h(1148): [C4005] see previous definition of 'TEXT'
  Platform.h(1148): [C4005] see previous definition of 'TEXT'
  Microsoft.MakeFile.targets(44, 5): [MSB3073] The command "D:\Unreal\EpicUnreal\UE_5.1\Engine\Build\BatchFiles\Build.bat GrpcTestEditor Win64 Development -Project="D:\GitRepo\GrpcTest\GrpcTest.uproject" -WaitMutex -FromMsBuild" exited with code 6.

Probably we can fix this by change to include xxx.grpc.pb.h rather than xxx.pb.h in XXXMarshaling.h

thejinchao commented 1 year ago

抱歉这段时间没看issue,我五一后看下这个问题

thejinchao commented 1 year ago

fixed, thanks