缺少protobuf lib DLL? 我正在使用VS 2017中的C++项目使用一个ProtoBuf类型。此类型在名为gameinformation.pb.h的自动生成库中定义。此头文件定义了命名空间GameInfo和包含的类GameInformation
我以前遇到过一些库问题,但我通过在Linker->Input:additional dependencies中添加到缺少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
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,并将其添加到链接库中。