Здравствуйте. Не получается использовать Protocol Buffers в VS 2017 (Debug x86). Выводит ошибки.
Порядок произведенных действий.
Исполнил команды
c:\protobuf-3.3.0\cmake\build\>mkdir debug & cd debug
c:\protobuf-3.3.0\cmake\build\debug>cmake -G "NMake Makefiles" ^
-DCMAKE_BUILD_TYPE=Debug ^
-DCMAKE_INSTALL_PREFIX=../../../../install ^
../.. ^ -Dprotobuf_BUILD_SHARED_LIBS=ON
c:\protobuf-3.3.0\cmake\build\debug>nmake & nmake install
Создал c:\install\proto\addressbook.proto
syntax = "proto2";
package tutorial;
message Person {
required string name = 1;
required int32 id = 2;
optional string email = 3;
}
Исполнил команду
protoc.exe --proto_path=c:\install\proto --error_format=msvs --cpp_out=c:\install\proto c:\install\proto\addressbook.proto
Создал проект в VS 2017, подключил addressbook.pb.h, addressbook.pb.cc
#include"addressbook.pb.h"
int main()
{
tutorial::Person address_book;
return 0;
}
Ошибка
Error LNK2001 unresolved external symbol "class google::protobuf::internal::ExplicitlyConstructed,class std::allocator > > google::protobuf::internal::fixed_address_empty_string" (?fixed_address_empty_string@internal@protobuf@google@@3V?$ExplicitlyConstructed@V?$basic_string@DU?$char_traits@D@std@@V?$allocator@D@2@@std@@@123@A) Protobuf C:\Users\cucaracha\Documents\Visual Studio 2017\Projects\Protobuf\Protobuf\addressbook.pb.obj 1
Как вести несколько рекламных аккаунтов в антидетект-браузере
Подготовка и масштабирование рекламных кампаний в среде Linken Sphere