grpc_async_bidirectional_stream_example icon indicating copy to clipboard operation
grpc_async_bidirectional_stream_example copied to clipboard

编译不通过

Open yourengod opened this issue 3 years ago • 1 comments

C:\Users\Administrator\Downloads\grpc_async_bidirectional_stream_example-main\out\build\x64-Debug\main.cpp.obj : error LNK2019: 无法解析的外部符号 "private: static class test::MsgEcho * __cdecl google::protobuf::Arena::CreateMaybeMessage<class test::MsgEcho>(class google::protobuf::Arena *)" (??$CreateMaybeMessage@VMsgEcho@test@@$$V@Arena@protobuf@google@@CAPEAVMsgEcho@test@@PEAV012@@Z),函数 "protected: static class test::MsgEcho * __cdecl google::protobuf::MessageLite::CreateMaybeMessage<class test::MsgEcho>(class google::protobuf::Arena *)" (??$CreateMaybeMessage@VMsgEcho@test@@@MessageLite@protobuf@google@@KAPEAVMsgEcho@test@@PEAVArena@12@@Z) 中引用了该符号 C:\Users\Administrator\Downloads\grpc_async_bidirectional_stream_example-main\out\build\x64-Debug\main.cpp.obj : error LNK2019: 无法解析的外部符号 "public: virtual __cdecl test::Frame::~Frame(void)" (??1Frame@test@@UEAA@XZ),函数 "public: virtual bool __cdecl Msg_TestService_Stream2::OnProcess(void)" (?OnProcess@Msg_TestService_Stream2@@UEAA_NXZ) 中引用了该符号 C:\Users\Administrator\Downloads\grpc_async_bidirectional_stream_example-main\out\build\x64-Debug\main.cpp.obj : error LNK2019: 无法解析的外部符号 "public: void __cdecl test::Frame::CopyFrom(class test::Frame const &)" (?CopyFrom@Frame@test@@QEAAXAEBV12@@Z),函数 "public: void __cdecl StreamBase<class Msg_TestService_Stream2,class test::TestService::WithAsyncMethod_Stream<class test::TestService::WithAsyncMethod_Stream2<class test::TestService::WithAsyncMethod_Echo<class test::TestService::Service> > >,class test::Frame,class test::Frame>::SendMsg(class test::Frame const &)" (?SendMsg@?$StreamBase@VMsg_TestService_Stream2@@V?$WithAsyncMethod_Stream@V?$WithAsyncMethod_Stream2@V?$WithAsyncMethod_Echo@VService@TestService@test@@@TestService@test@@@TestService@test@@@TestService@test@@VFrame@4@V54@@@QEAAXAEBVFrame@test@@@Z) 中引用了该符号 C:\Users\Administrator\Downloads\grpc_async_bidirectional_stream_example-main\out\build\x64-Debug\main.cpp.obj : error LNK2019: 无法解析的外部符号 "public: virtual void __cdecl test::Frame::Clear(void)" (?Clear@Frame@test@@UEAAXXZ),函数 "protected: void __cdecl StreamBase<class Msg_TestService_Stream2,class test::TestService::WithAsyncMethod_Stream<class test::TestService::WithAsyncMethod_Stream2<class test::TestService::WithAsyncMethod_Echo<class test::TestService::Service> > >,class test::Frame,class test::Frame>::OpRead(void)" (?OpRead@?$StreamBase@VMsg_TestService_Stream2@@V?$WithAsyncMethod_Stream@V?$WithAsyncMethod_Stream2@V?$WithAsyncMethod_Echo@VService@TestService@test@@@TestService@test@@@TestService@test@@@TestService@test@@VFrame@4@V54@@@IEAAXXZ) 中引用了该符号 C:\Users\Administrator\Downloads\grpc_async_bidirectional_stream_example-main\out\build\x64-Debug\main.cpp.obj : error LNK2019: 无法解析的外部符号 "protected: __cdecl test::Frame::Frame(class google::protobuf::Arena *,bool)" (??0Frame@test@@IEAA@PEAVArena@protobuf@google@@_N@Z),函数 "public: __cdecl test::Frame::Frame(void)" (??0Frame@test@@QEAA@XZ) 中引用了该符号 C:\Users\Administrator\Downloads\grpc_async_bidirectional_stream_example-main\out\build\x64-Debug\main.cpp.obj : error LNK2019: 无法解析的外部符号 "public: void __cdecl test::Frame::clear_Msg(void)" (?clear_Msg@Frame@test@@QEAAXXZ),函数 "private: class test::MsgEcho * __cdecl test::Frame::_internal_mutable_echo(void)" (?_internal_mutable_echo@Frame@test@@AEAAPEAVMsgEcho@2@XZ) 中引用了该符号 C:\Users\Administrator\Downloads\grpc_async_bidirectional_stream_example-main\out\build\x64-Debug\main.cpp.obj : error LNK2019: 无法解析的外部符号 "public: __cdecl test::TestService::Service::Service(void)" (??0Service@TestService@test@@QEAA@XZ),函数 "public: __cdecl test::TestService::WithAsyncMethod_Echo<class test::TestService::Service>::WithAsyncMethod_Echo<class test::TestService::Service>(void)" (??0?$WithAsyncMethod_Echo@VService@TestService@test@@@TestService@test@@QEAA@XZ) 中引用了该符号 C:\Users\Administrator\Downloads\grpc_async_bidirectional_stream_example-main\out\build\x64-Debug\main.cpp.obj : error LNK2019: 无法解析的外部符号 "public: virtual __cdecl test::TestService::Service::~Service(void)" (??1Service@TestService@test@@UEAA@XZ),函数 "int public: __cdecl test::TestService::WithAsyncMethod_Echo<class test::TestService::Service>::WithAsyncMethod_Echo<class test::TestService::Service>(void)'::1'::dtor$0" (?dtor$0@?0???0?$WithAsyncMethod_Echo@VService@TestService@test@@@TestService@test@@QEAA@XZ@4HA) 中引用了该符号 C:\Users\Administrator\Downloads\grpc_async_bidirectional_stream_example-main\out\build\x64-Debug\main.cpp.obj : error LNK2001: 无法解析的外部符号 "public: virtual class grpc::Status __cdecl test::TestService::Service::Stream(class grpc::ServerContext *,class grpc::ServerReaderWriter<class test::Frame,class test::Frame> *)" (?Stream@Service@TestService@test@@UEAA?AVStatus@grpc@@PEAVServerContext@5@PEAV?$ServerReaderWriter@VFrame@test@@V12@@5@@Z) C:\Users\Administrator\Downloads\grpc_async_bidirectional_stream_example-main\out\build\x64-Debug\main.cpp.obj : error LNK2001: 无法解析的外部符号 "public: virtual class grpc::Status __cdecl test::TestService::Service::Stream2(class grpc::ServerContext *,class grpc::ServerReaderWriter<class test::Frame,class test::Frame> *)" (?Stream2@Service@TestService@test@@UEAA?AVStatus@grpc@@PEAVServerContext@5@PEAV?$ServerReaderWriter@VFrame@test@@V12@@5@@Z) C:\Users\Administrator\Downloads\grpc_async_bidirectional_stream_example-main\out\build\x64-Debug\main.cpp.obj : error LNK2001: 无法解析的外部符号 "struct test::MsgEchoDefaultTypeInternal test::MsgEcho_default_instance" (?MsgEcho_default_instance@test@@3UMsgEchoDefaultTypeInternal@1@A) C:\Users\Administrator\Downloads\grpc_async_bidirectional_stream_example-main\out\build\x64-Debug\main.cpp.obj : error LNK2019: 无法解析的外部符号 "const test::Frame::`vftable'" (??_7Frame@test@@6B@),函数 "public: __cdecl test::Frame::Frame(void)" (??0Frame@test@@QEAA@XZ) 中引用了该符号 C:\Users\Administrator\Downloads\grpc_async_bidirectional_stream_example-main\out\build\x64-Debug\test.exe : fatal error LNK1120: 12 个无法解析的外部命令

yourengod avatar Jul 06 '22 09:07 yourengod

build.linux.shgen_vs_sln.bat,如果不行,上面的错误,代码在 src/proto 目录下,自己编译脚本包含下

fananchong avatar Jul 16 '22 02:07 fananchong