Warning: file_get_contents(/data/phpspider/zhask/data//catemap/6/cplusplus/156.json): failed to open stream: No such file or directory in /data/phpspider/zhask/libs/function.php on line 167

Warning: Invalid argument supplied for foreach() in /data/phpspider/zhask/libs/tag.function.php on line 1116

Notice: Undefined index: in /data/phpspider/zhask/libs/function.php on line 180

Warning: array_chunk() expects parameter 1 to be array, null given in /data/phpspider/zhask/libs/function.php on line 181
缺少protobuf lib DLL? 我正在使用VS 2017中的C++项目使用一个ProtoBuf类型。此类型在名为gameinformation.pb.h的自动生成库中定义。此头文件定义了命名空间GameInfo和包含的类GameInformation_C++_Visual Studio_Protobuf C - Fatal编程技术网

缺少protobuf lib DLL? 我正在使用VS 2017中的C++项目使用一个ProtoBuf类型。此类型在名为gameinformation.pb.h的自动生成库中定义。此头文件定义了命名空间GameInfo和包含的类GameInformation

缺少protobuf lib DLL? 我正在使用VS 2017中的C++项目使用一个ProtoBuf类型。此类型在名为gameinformation.pb.h的自动生成库中定义。此头文件定义了命名空间GameInfo和包含的类GameInformation,c++,visual-studio,protobuf-c,C++,Visual Studio,Protobuf C,我以前遇到过一些库问题,但我通过在Linker->Input:additional dependencies中添加到libprotobuf.lib的路径并在代码中添加行#define PROTOBUF\u USE\u DLLS修复了这些问题 但是,现在,程序编译时似乎正在为gameinformation.pb.h查找.dll: 1>Server.obj : error LNK2001: unresolved external symbol "public: virtual __c

我以前遇到过一些库问题,但我通过在Linker->Input:additional dependencies中添加到
libprotobuf.lib
的路径并在代码中添加行
#define PROTOBUF\u USE\u DLLS
修复了这些问题

但是,现在,程序编译时似乎正在为
gameinformation.pb.h
查找
.dll

1>Server.obj : error LNK2001: unresolved external symbol "public: virtual __cdecl GameInfo::GameInformation::~GameInformation(void)" (??1GameInformation@GameInfo@@UEAA@XZ)
1>Server.obj : error LNK2001: unresolved external symbol "protected: __cdecl GameInfo::GameInformation::GameInformation(class google::protobuf::Arena *)" (??0GameInformation@GameInfo@@IEAA@PEAVArena@protobuf@google@@@Z)
1>Server.obj : error LNK2001: unresolved external symbol "const GameInfo::GameInformation::`vftable'" (??_7GameInformation@GameInfo@@6B@)
1>C:\Perforce\eve\branches\sandbox\EAC_EVAL\carbon\src\test_game_server\x64\Release\test_game_server.exe : fatal error LNK1120: 3 unresolved externals
头文件是自动生成的,似乎没有
gameinformation.dll/.lib
文件


我需要做什么?

您需要从protoguf生成的源代码(
gameinformation.pb.cpp
gameinformation.pb.cc
)创建一个DLL,并将其添加到链接库中。