title: gRPC C++ on Windows
body: <p>I have been trying for 3 days by now to find how to install and use gRPC on windows with no luck.  I am using Visual Studio 2015, Win7 64-bit. To be safe, I'll write step by step of what I am doing.  It might not be necessary but I am a beginner with C++ and with VS so I am not at all sure I am doing it correctly:</p>
  
  <p>(following guide <a href="http://www.infopulse.com/blog/grpc-framework-by-google-tutorial/" rel="noreferrer">http://www.infopulse.com/blog/grpc-framework-by-google-tutorial/</a>):</p>
  
  <ul>
  <li>Get gRPC from git, init submodules</li>
  <li>Get gmock and gtest for protobuf (not in the guide, but else it
  doesn't work)</li>
  <li>Run <em>cmake</em> on protobuf</li>
  <li>Build <em>protobuf.sln</em> in Visual Studio in Release mode (set for each part of the solution Property Manager > C/C++ > Code Generation > Runtime Library > <strong>/MDd</strong>)</li>
  <li>Copy Release/ folder to protobuf/cmake/ (instead of Debug/ as in intructions - that would give me <em>libprotobufd.lib</em> instead of <em>libprotobuf.lib</em> which is required)</li>
  <li>Build <em>grpc/vsprojects/grpc_protoc_plugins.sln</em> in VS also in Release mode and again set for each part of the solution Property Manager > C/C++ > Code Generation > Runtime Library > <strong>/MDd</strong></li>
  <li>Copy <em>protoc.exe</em> from protobuf/cmake/Release to grpc/vsprojects/Release, which was created in previous step</li>
  <li>Build <em>grpc/vsprojects/grpc.sln</em> in VS in Debug mode (only the grpc++ part as I read somewhere and again set for each part of the solution Property Manager > C/C++ > Code Generation > Runtime Library > <strong>/MDd</strong>)</li>
  </ul>
  
  <p>So far things are going well.</p>
  
  <ul>
  <li><p>Generate c files from proto in example folder. I get <em>helloworld.grpc.pb.cc</em>, <em>helloworld.grpc.pb.h</em>, <em>helloworld.pb.cc</em> and <em>helloworld.pb.h</em> and move them all to grpc/examples/cpp/helloworld:</p>
  
  <p>protoc --grpc_out=./hello_proto --plugin=protoc-gen-grpc=grpc_cpp_plugin.exe ../../examples/protos/helloworld.proto --proto_path=../../examples/protos</p>
  
  <p>protoc --cpp_out=./hello_proto ../../examples/protos/helloworld.proto --proto_path=../../examples/protos</p></li>
  <li><p>I keep the <em>grpc.sln</em> open in VS and 'Add' > 'New Project'</p></li>
  <li>To the new project 'Add' > 'Existing Item' and add <em>greeter_client.cc</em> from grpc/examples/cpp</li>
  <li>Add dependencies as: <a href="https://github.com/grpc/grpc/issues/4707" rel="noreferrer">https://github.com/grpc/grpc/issues/4707</a> , with Includes going in C/C++ > Additional Include Directories</li>
  </ul>
  
  <p>When I try to build my project errors are reported with not finding gflags, gtest, and libprotobuf. If I find it all and move them to an included folder, then I get these errors:</p>
  
  <pre><code>    1&gt;------ Build started: Project: greeter_client, Configuration: Debug Win32 ------
  1&gt;  greeter_client.cc
  1&gt;libprotobuf.lib(generated_message_util.obj) : error LNK2038: mismatch detected for '_ITERATOR_DEBUG_LEVEL': value '0' doesn't match value '2' in greeter_client.obj
  1&gt;libprotobuf.lib(generated_message_util.obj) : error LNK2038: mismatch detected for 'RuntimeLibrary': value 'MT_StaticRelease' doesn't match value 'MDd_DynamicDebug' in greeter_client.obj
  1&gt;libprotobuf.lib(common.obj) : error LNK2038: mismatch detected for '_ITERATOR_DEBUG_LEVEL': value '0' doesn't match value '2' in greeter_client.obj
  1&gt;libprotobuf.lib(common.obj) : error LNK2038: mismatch detected for 'RuntimeLibrary': value 'MT_StaticRelease' doesn't match value 'MDd_DynamicDebug' in greeter_client.obj
  1&gt;libprotobuf.lib(once.obj) : error LNK2038: mismatch detected for '_ITERATOR_DEBUG_LEVEL': value '0' doesn't match value '2' in greeter_client.obj
  1&gt;libprotobuf.lib(once.obj) : error LNK2038: mismatch detected for 'RuntimeLibrary': value 'MT_StaticRelease' doesn't match value 'MDd_DynamicDebug' in greeter_client.obj
  1&gt;libprotobuf.lib(status.obj) : error LNK2038: mismatch detected for '_ITERATOR_DEBUG_LEVEL': value '0' doesn't match value '2' in greeter_client.obj
  1&gt;libprotobuf.lib(status.obj) : error LNK2038: mismatch detected for 'RuntimeLibrary': value 'MT_StaticRelease' doesn't match value 'MDd_DynamicDebug' in greeter_client.obj
  1&gt;libprotobuf.lib(int128.obj) : error LNK2038: mismatch detected for '_ITERATOR_DEBUG_LEVEL': value '0' doesn't match value '2' in greeter_client.obj
  1&gt;libprotobuf.lib(int128.obj) : error LNK2038: mismatch detected for 'RuntimeLibrary': value 'MT_StaticRelease' doesn't match value 'MDd_DynamicDebug' in greeter_client.obj
  1&gt;libprotobuf.lib(atomicops_internals_x86_msvc.obj) : error LNK2038: mismatch detected for '_ITERATOR_DEBUG_LEVEL': value '0' doesn't match value '2' in greeter_client.obj
  1&gt;libprotobuf.lib(atomicops_internals_x86_msvc.obj) : error LNK2038: mismatch detected for 'RuntimeLibrary': value 'MT_StaticRelease' doesn't match value 'MDd_DynamicDebug' in greeter_client.obj
  1&gt;grpc++.lib(client_context.obj) : error LNK2038: mismatch detected for 'RuntimeLibrary': value 'MTd_StaticDebug' doesn't match value 'MDd_DynamicDebug' in greeter_client.obj
  1&gt;grpc++.lib(insecure_credentials.obj) : error LNK2038: mismatch detected for 'RuntimeLibrary': value 'MTd_StaticDebug' doesn't match value 'MDd_DynamicDebug' in greeter_client.obj
  1&gt;grpc++.lib(create_channel.obj) : error LNK2038: mismatch detected for 'RuntimeLibrary': value 'MTd_StaticDebug' doesn't match value 'MDd_DynamicDebug' in greeter_client.obj
  1&gt;grpc++.lib(credentials.obj) : error LNK2038: mismatch detected for 'RuntimeLibrary': value 'MTd_StaticDebug' doesn't match value 'MDd_DynamicDebug' in greeter_client.obj
  1&gt;grpc++.lib(create_channel_internal.obj) : error LNK2038: mismatch detected for 'RuntimeLibrary': value 'MTd_StaticDebug' doesn't match value 'MDd_DynamicDebug' in greeter_client.obj
  1&gt;grpc++.lib(channel_arguments.obj) : error LNK2038: mismatch detected for 'RuntimeLibrary': value 'MTd_StaticDebug' doesn't match value 'MDd_DynamicDebug' in greeter_client.obj
  1&gt;grpc++.lib(core_codegen.obj) : error LNK2038: mismatch detected for 'RuntimeLibrary': value 'MTd_StaticDebug' doesn't match value 'MDd_DynamicDebug' in greeter_client.obj
  1&gt;grpc++.lib(codegen_init.obj) : error LNK2038: mismatch detected for 'RuntimeLibrary': value 'MTd_StaticDebug' doesn't match value 'MDd_DynamicDebug' in greeter_client.obj
  1&gt;grpc++.lib(status.obj) : error LNK2038: mismatch detected for 'RuntimeLibrary': value 'MTd_StaticDebug' doesn't match value 'MDd_DynamicDebug' in greeter_client.obj
  1&gt;msvcprtd.lib(MSVCP140D.dll) : error LNK2005: "public: bool __thiscall std::ios_base::good(void)const " (?good@ios_base@std@@QBE_NXZ) already defined in grpc++.lib(channel_arguments.obj)
  1&gt;msvcprtd.lib(MSVCP140D.dll) : error LNK2005: "public: int __thiscall std::ios_base::flags(void)const " (?flags@ios_base@std@@QBEHXZ) already defined in grpc++.lib(channel_arguments.obj)
  1&gt;msvcprtd.lib(MSVCP140D.dll) : error LNK2005: "public: __int64 __thiscall std::ios_base::width(void)const " (?width@ios_base@std@@QBE_JXZ) already defined in grpc++.lib(channel_arguments.obj)
  1&gt;msvcprtd.lib(MSVCP140D.dll) : error LNK2005: "public: __int64 __thiscall std::ios_base::width(__int64)" (?width@ios_base@std@@QAE_J_J@Z) already defined in grpc++.lib(channel_arguments.obj)
  1&gt;msvcprtd.lib(MSVCP140D.dll) : error LNK2005: "public: int __thiscall std::basic_streambuf&lt;char,struct std::char_traits&lt;char&gt; &gt;::sputc(char)" (?sputc@?$basic_streambuf@DU?$char_traits@D@std@@@std@@QAEHD@Z) already defined in grpc++.lib(channel_arguments.obj)
  1&gt;msvcprtd.lib(MSVCP140D.dll) : error LNK2005: "public: __int64 __thiscall std::basic_streambuf&lt;char,struct std::char_traits&lt;char&gt; &gt;::sputn(char const *,__int64)" (?sputn@?$basic_streambuf@DU?$char_traits@D@std@@@std@@QAE_JPBD_J@Z) already defined in grpc++.lib(channel_arguments.obj)
  1&gt;msvcprtd.lib(MSVCP140D.dll) : error LNK2005: "public: void __thiscall std::basic_ios&lt;char,struct std::char_traits&lt;char&gt; &gt;::setstate(int,bool)" (?setstate@?$basic_ios@DU?$char_traits@D@std@@@std@@QAEXH_N@Z) already defined in grpc++.lib(channel_arguments.obj)
  1&gt;msvcprtd.lib(MSVCP140D.dll) : error LNK2005: "public: class std::basic_ostream&lt;char,struct std::char_traits&lt;char&gt; &gt; * __thiscall std::basic_ios&lt;char,struct std::char_traits&lt;char&gt; &gt;::tie(void)const " (?tie@?$basic_ios@DU?$char_traits@D@std@@@std@@QBEPAV?$basic_ostream@DU?$char_traits@D@std@@@2@XZ) already defined in grpc++.lib(channel_arguments.obj)
  1&gt;msvcprtd.lib(MSVCP140D.dll) : error LNK2005: "public: class std::basic_streambuf&lt;char,struct std::char_traits&lt;char&gt; &gt; * __thiscall std::basic_ios&lt;char,struct std::char_traits&lt;char&gt; &gt;::rdbuf(void)const " (?rdbuf@?$basic_ios@DU?$char_traits@D@std@@@std@@QBEPAV?$basic_streambuf@DU?$char_traits@D@std@@@2@XZ) already defined in grpc++.lib(channel_arguments.obj)
  1&gt;msvcprtd.lib(MSVCP140D.dll) : error LNK2005: "public: char __thiscall std::basic_ios&lt;char,struct std::char_traits&lt;char&gt; &gt;::fill(void)const " (?fill@?$basic_ios@DU?$char_traits@D@std@@@std@@QBEDXZ) already defined in grpc++.lib(channel_arguments.obj)
  1&gt;msvcprtd.lib(MSVCP140D.dll) : error LNK2005: "public: char __thiscall std::basic_ios&lt;char,struct std::char_traits&lt;char&gt; &gt;::widen(char)const " (?widen@?$basic_ios@DU?$char_traits@D@std@@@std@@QBEDD@Z) already defined in grpc++.lib(channel_arguments.obj)
  1&gt;msvcprtd.lib(MSVCP140D.dll) : error LNK2005: "public: void __thiscall std::basic_ostream&lt;char,struct std::char_traits&lt;char&gt; &gt;::_Osfx(void)" (?_Osfx@?$basic_ostream@DU?$char_traits@D@std@@@std@@QAEXXZ) already defined in libprotobuf.lib(status.obj)
  1&gt;msvcprtd.lib(MSVCP140D.dll) : error LNK2005: "public: class std::basic_ostream&lt;char,struct std::char_traits&lt;char&gt; &gt; &amp; __thiscall std::basic_ostream&lt;char,struct std::char_traits&lt;char&gt; &gt;::flush(void)" (?flush@?$basic_ostream@DU?$char_traits@D@std@@@std@@QAEAAV12@XZ) already defined in libprotobuf.lib(status.obj)
  1&gt;libcpmt.lib(ios.obj) : error LNK2038: mismatch detected for '_ITERATOR_DEBUG_LEVEL': value '0' doesn't match value '2' in greeter_client.obj
  1&gt;libcpmt.lib(ios.obj) : error LNK2038: mismatch detected for 'RuntimeLibrary': value 'MT_StaticRelease' doesn't match value 'MDd_DynamicDebug' in greeter_client.obj
  1&gt;libcpmt.lib(ios.obj) : error LNK2005: "public: static void __cdecl std::ios_base::_Addstd(class std::ios_base *)" (?_Addstd@ios_base@std@@SAXPAV12@@Z) already defined in msvcprtd.lib(MSVCP140D.dll)
  1&gt;libcpmt.lib(ios.obj) : error LNK2005: "private: static void __cdecl std::ios_base::_Ios_base_dtor(class std::ios_base *)" (?_Ios_base_dtor@ios_base@std@@CAXPAV12@@Z) already defined in msvcprtd.lib(MSVCP140D.dll)
  1&gt;libcpmt.lib(locale0.obj) : error LNK2038: mismatch detected for '_ITERATOR_DEBUG_LEVEL': value '0' doesn't match value '2' in greeter_client.obj
  1&gt;libcpmt.lib(locale0.obj) : error LNK2038: mismatch detected for 'RuntimeLibrary': value 'MT_StaticRelease' doesn't match value 'MDd_DynamicDebug' in greeter_client.obj
  1&gt;libcpmt.lib(locale0.obj) : error LNK2005: "void __cdecl std::_Facet_Register(class std::_Facet_base *)" (?_Facet_Register@std@@YAXPAV_Facet_base@1@@Z) already defined in msvcprtd.lib(locale0_implib.obj)
  1&gt;libcpmt.lib(locale0.obj) : error LNK2005: "private: static class std::locale::_Locimp * __cdecl std::locale::_Getgloballocale(void)" (?_Getgloballocale@locale@std@@CAPAV_Locimp@12@XZ) already defined in msvcprtd.lib(MSVCP140D.dll)
  1&gt;libcpmt.lib(locale0.obj) : error LNK2005: "private: static class std::locale::_Locimp * __cdecl std::locale::_Init(bool)" (?_Init@locale@std@@CAPAV_Locimp@12@_N@Z) already defined in msvcprtd.lib(MSVCP140D.dll)
  1&gt;libcpmt.lib(locale0.obj) : error LNK2005: "public: static void __cdecl std::_Locinfo::_Locinfo_ctor(class std::_Locinfo *,char const *)" (?_Locinfo_ctor@_Locinfo@std@@SAXPAV12@PBD@Z) already defined in msvcprtd.lib(MSVCP140D.dll)
  1&gt;libcpmt.lib(locale0.obj) : error LNK2005: "public: static void __cdecl std::_Locinfo::_Locinfo_dtor(class std::_Locinfo *)" (?_Locinfo_dtor@_Locinfo@std@@SAXPAV12@@Z) already defined in msvcprtd.lib(MSVCP140D.dll)
  1&gt;libcpmt.lib(iosptrs.obj) : error LNK2038: mismatch detected for '_ITERATOR_DEBUG_LEVEL': value '0' doesn't match value '2' in greeter_client.obj
  1&gt;libcpmt.lib(iosptrs.obj) : error LNK2038: mismatch detected for 'RuntimeLibrary': value 'MT_StaticRelease' doesn't match value 'MDd_DynamicDebug' in greeter_client.obj
  1&gt;libcpmt.lib(locale.obj) : error LNK2038: mismatch detected for '_ITERATOR_DEBUG_LEVEL': value '0' doesn't match value '2' in greeter_client.obj
  1&gt;libcpmt.lib(locale.obj) : error LNK2038: mismatch detected for 'RuntimeLibrary': value 'MT_StaticRelease' doesn't match value 'MDd_DynamicDebug' in greeter_client.obj
  1&gt;libcpmt.lib(xlock.obj) : error LNK2038: mismatch detected for '_ITERATOR_DEBUG_LEVEL': value '0' doesn't match value '2' in greeter_client.obj
  1&gt;libcpmt.lib(xlock.obj) : error LNK2038: mismatch detected for 'RuntimeLibrary': value 'MT_StaticRelease' doesn't match value 'MDd_DynamicDebug' in greeter_client.obj
  1&gt;libcpmt.lib(xlock.obj) : error LNK2005: "public: __thiscall std::_Lockit::_Lockit(int)" (??0_Lockit@std@@QAE@H@Z) already defined in msvcprtd.lib(MSVCP140D.dll)
  1&gt;libcpmt.lib(xlock.obj) : error LNK2005: "public: __thiscall std::_Lockit::~_Lockit(void)" (??1_Lockit@std@@QAE@XZ) already defined in msvcprtd.lib(MSVCP140D.dll)
  1&gt;libcpmt.lib(xthrow.obj) : error LNK2038: mismatch detected for '_ITERATOR_DEBUG_LEVEL': value '0' doesn't match value '2' in greeter_client.obj
  1&gt;libcpmt.lib(xthrow.obj) : error LNK2038: mismatch detected for 'RuntimeLibrary': value 'MT_StaticRelease' doesn't match value 'MDd_DynamicDebug' in greeter_client.obj
  1&gt;libcpmt.lib(xthrow.obj) : error LNK2005: "void __cdecl std::_Xbad_alloc(void)" (?_Xbad_alloc@std@@YAXXZ) already defined in msvcprtd.lib(MSVCP140D.dll)
  1&gt;libcpmt.lib(xthrow.obj) : error LNK2005: "void __cdecl std::_Xlength_error(char const *)" (?_Xlength_error@std@@YAXPBD@Z) already defined in msvcprtd.lib(MSVCP140D.dll)
  1&gt;libcpmt.lib(xthrow.obj) : error LNK2005: "void __cdecl std::_Xout_of_range(char const *)" (?_Xout_of_range@std@@YAXPBD@Z) already defined in msvcprtd.lib(MSVCP140D.dll)
  1&gt;libcpmt.lib(wlocale.obj) : error LNK2038: mismatch detected for '_ITERATOR_DEBUG_LEVEL': value '0' doesn't match value '2' in greeter_client.obj
  1&gt;libcpmt.lib(wlocale.obj) : error LNK2038: mismatch detected for 'RuntimeLibrary': value 'MT_StaticRelease' doesn't match value 'MDd_DynamicDebug' in greeter_client.obj
  1&gt;libcpmt.lib(xlocale.obj) : error LNK2038: mismatch detected for '_ITERATOR_DEBUG_LEVEL': value '0' doesn't match value '2' in greeter_client.obj
  1&gt;libcpmt.lib(xlocale.obj) : error LNK2038: mismatch detected for 'RuntimeLibrary': value 'MT_StaticRelease' doesn't match value 'MDd_DynamicDebug' in greeter_client.obj
  1&gt;libcpmt.lib(xdateord.obj) : error LNK2038: mismatch detected for '_ITERATOR_DEBUG_LEVEL': value '0' doesn't match value '2' in greeter_client.obj
  1&gt;libcpmt.lib(xdateord.obj) : error LNK2038: mismatch detected for 'RuntimeLibrary': value 'MT_StaticRelease' doesn't match value 'MDd_DynamicDebug' in greeter_client.obj
  1&gt;libcpmt.lib(xwctomb.obj) : error LNK2005: __Getcvt already defined in msvcprtd.lib(MSVCP140D.dll)
  1&gt;libcpmt.lib(winapisupp.obj) : error LNK2038: mismatch detected for '_ITERATOR_DEBUG_LEVEL': value '0' doesn't match value '2' in greeter_client.obj
  1&gt;libcpmt.lib(winapisupp.obj) : error LNK2038: mismatch detected for 'RuntimeLibrary': value 'MT_StaticRelease' doesn't match value 'MDd_DynamicDebug' in greeter_client.obj
  1&gt;libcpmt.lib(StlCompareStringA.obj) : error LNK2038: mismatch detected for '_ITERATOR_DEBUG_LEVEL': value '0' doesn't match value '2' in greeter_client.obj
  1&gt;libcpmt.lib(StlCompareStringA.obj) : error LNK2038: mismatch detected for 'RuntimeLibrary': value 'MT_StaticRelease' doesn't match value 'MDd_DynamicDebug' in greeter_client.obj
  1&gt;libcpmt.lib(winapinls.obj) : error LNK2038: mismatch detected for '_ITERATOR_DEBUG_LEVEL': value '0' doesn't match value '2' in greeter_client.obj
  1&gt;libcpmt.lib(winapinls.obj) : error LNK2038: mismatch detected for 'RuntimeLibrary': value 'MT_StaticRelease' doesn't match value 'MDd_DynamicDebug' in greeter_client.obj
  1&gt;libcpmt.lib(StlCompareStringW.obj) : error LNK2038: mismatch detected for '_ITERATOR_DEBUG_LEVEL': value '0' doesn't match value '2' in greeter_client.obj
  1&gt;libcpmt.lib(StlCompareStringW.obj) : error LNK2038: mismatch detected for 'RuntimeLibrary': value 'MT_StaticRelease' doesn't match value 'MDd_DynamicDebug' in greeter_client.obj
  1&gt;libcpmt.lib(StlLCMapStringW.obj) : error LNK2038: mismatch detected for '_ITERATOR_DEBUG_LEVEL': value '0' doesn't match value '2' in greeter_client.obj
  1&gt;libcpmt.lib(StlLCMapStringW.obj) : error LNK2038: mismatch detected for 'RuntimeLibrary': value 'MT_StaticRelease' doesn't match value 'MDd_DynamicDebug' in greeter_client.obj
  1&gt;libcpmt.lib(StlLCMapStringA.obj) : error LNK2038: mismatch detected for '_ITERATOR_DEBUG_LEVEL': value '0' doesn't match value '2' in greeter_client.obj
  1&gt;libcpmt.lib(StlLCMapStringA.obj) : error LNK2038: mismatch detected for 'RuntimeLibrary': value 'MT_StaticRelease' doesn't match value 'MDd_DynamicDebug' in greeter_client.obj
  1&gt;LINK : warning LNK4098: defaultlib 'LIBCMT' conflicts with use of other libs; use /NODEFAULTLIB:library
  1&gt;LINK : warning LNK4098: defaultlib 'LIBCMTD' conflicts with use of other libs; use /NODEFAULTLIB:library
  1&gt;libeay32.lib(c_zlib.obj) : warning LNK4217: locally defined symbol _deflate imported in function _BIO_f_zlib
  1&gt;libeay32.lib(c_zlib.obj) : warning LNK4217: locally defined symbol _deflateEnd imported in function _BIO_f_zlib
  1&gt;libeay32.lib(c_zlib.obj) : warning LNK4217: locally defined symbol _inflate imported in function _BIO_f_zlib
  1&gt;libeay32.lib(c_zlib.obj) : warning LNK4217: locally defined symbol _inflateEnd imported in function _BIO_f_zlib
  1&gt;libeay32.lib(c_zlib.obj) : warning LNK4217: locally defined symbol _deflateInit_ imported in function _BIO_f_zlib
  1&gt;libeay32.lib(c_zlib.obj) : warning LNK4217: locally defined symbol _inflateInit_ imported in function _BIO_f_zlib
  1&gt;libeay32.lib(c_zlib.obj) : warning LNK4217: locally defined symbol _zError imported in function _zlib_zfree
  1&gt;greeter_client.obj : error LNK2019: unresolved external symbol "public: __thiscall helloworld::HelloRequest::HelloRequest(void)" (??0HelloRequest@helloworld@@QAE@XZ) referenced in function "public: class std::basic_string&lt;char,struct std::char_traits&lt;char&gt;,class std::allocator&lt;char&gt; &gt; __thiscall GreeterClient::SayHello(class std::basic_string&lt;char,struct std::char_traits&lt;char&gt;,class std::allocator&lt;char&gt; &gt; const &amp;)" (?SayHello@GreeterClient@@QAE?AV?$basic_string@DU?$char_traits@D@std@@V?$allocator@D@2@@std@@ABV23@@Z)
  1&gt;greeter_client.obj : error LNK2019: unresolved external symbol "public: virtual __thiscall helloworld::HelloRequest::~HelloRequest(void)" (??1HelloRequest@helloworld@@UAE@XZ) referenced in function "public: class std::basic_string&lt;char,struct std::char_traits&lt;char&gt;,class std::allocator&lt;char&gt; &gt; __thiscall GreeterClient::SayHello(class std::basic_string&lt;char,struct std::char_traits&lt;char&gt;,class std::allocator&lt;char&gt; &gt; const &amp;)" (?SayHello@GreeterClient@@QAE?AV?$basic_string@DU?$char_traits@D@std@@V?$allocator@D@2@@std@@ABV23@@Z)
  1&gt;greeter_client.obj : error LNK2019: unresolved external symbol "public: __thiscall helloworld::HelloReply::HelloReply(void)" (??0HelloReply@helloworld@@QAE@XZ) referenced in function "public: class std::basic_string&lt;char,struct std::char_traits&lt;char&gt;,class std::allocator&lt;char&gt; &gt; __thiscall GreeterClient::SayHello(class std::basic_string&lt;char,struct std::char_traits&lt;char&gt;,class std::allocator&lt;char&gt; &gt; const &amp;)" (?SayHello@GreeterClient@@QAE?AV?$basic_string@DU?$char_traits@D@std@@V?$allocator@D@2@@std@@ABV23@@Z)
  1&gt;greeter_client.obj : error LNK2019: unresolved external symbol "public: virtual __thiscall helloworld::HelloReply::~HelloReply(void)" (??1HelloReply@helloworld@@UAE@XZ) referenced in function "public: class std::basic_string&lt;char,struct std::char_traits&lt;char&gt;,class std::allocator&lt;char&gt; &gt; __thiscall GreeterClient::SayHello(class std::basic_string&lt;char,struct std::char_traits&lt;char&gt;,class std::allocator&lt;char&gt; &gt; const &amp;)" (?SayHello@GreeterClient@@QAE?AV?$basic_string@DU?$char_traits@D@std@@V?$allocator@D@2@@std@@ABV23@@Z)
  1&gt;greeter_client.obj : error LNK2019: unresolved external symbol "public: virtual class grpc::Status __thiscall helloworld::Greeter::Stub::SayHello(class grpc::ClientContext *,class helloworld::HelloRequest const &amp;,class helloworld::HelloReply *)" (?SayHello@Stub@Greeter@helloworld@@UAE?AVStatus@grpc@@PAVClientContext@5@ABVHelloRequest@3@PAVHelloReply@3@@Z) referenced in function "public: class std::basic_string&lt;char,struct std::char_traits&lt;char&gt;,class std::allocator&lt;char&gt; &gt; __thiscall GreeterClient::SayHello(class std::basic_string&lt;char,struct std::char_traits&lt;char&gt;,class std::allocator&lt;char&gt; &gt; const &amp;)" (?SayHello@GreeterClient@@QAE?AV?$basic_string@DU?$char_traits@D@std@@V?$allocator@D@2@@std@@ABV23@@Z)
  1&gt;greeter_client.obj : error LNK2019: unresolved external symbol "public: static class std::unique_ptr&lt;class helloworld::Greeter::Stub,struct std::default_delete&lt;class helloworld::Greeter::Stub&gt; &gt; __cdecl helloworld::Greeter::NewStub(class std::shared_ptr&lt;class grpc::ChannelInterface&gt; const &amp;,class grpc::StubOptions const &amp;)" (?NewStub@Greeter@helloworld@@SA?AV?$unique_ptr@VStub@Greeter@helloworld@@U?$default_delete@VStub@Greeter@helloworld@@@std@@@std@@ABV?$shared_ptr@VChannelInterface@grpc@@@4@ABVStubOptions@grpc@@@Z) referenced in function "public: __thiscall GreeterClient::GreeterClient(class std::shared_ptr&lt;class grpc::Channel&gt;)" (??0GreeterClient@@QAE@V?$shared_ptr@VChannel@grpc@@@std@@@Z)
  1&gt;grpc++.lib(create_channel_internal.obj) : error LNK2019: unresolved external symbol "public: virtual __thiscall grpc::Channel::~Channel(void)" (??1Channel@grpc@@UAE@XZ) referenced in function "public: virtual void * __thiscall grpc::Channel::`scalar deleting destructor'(unsigned int)" (??_GChannel@grpc@@UAEPAXI@Z)
  1&gt;grpc++.lib(create_channel_internal.obj) : error LNK2019: unresolved external symbol "private: __thiscall grpc::Channel::Channel(class std::basic_string&lt;char,struct std::char_traits&lt;char&gt;,class std::allocator&lt;char&gt; &gt; const &amp;,struct grpc_channel *)" (??0Channel@grpc@@AAE@ABV?$basic_string@DU?$char_traits@D@std@@V?$allocator@D@2@@std@@PAUgrpc_channel@@@Z) referenced in function "class std::shared_ptr&lt;class grpc::Channel&gt; __cdecl grpc::CreateChannelInternal(class std::basic_string&lt;char,struct std::char_traits&lt;char&gt;,class std::allocator&lt;char&gt; &gt; const &amp;,struct grpc_channel *)" (?CreateChannelInternal@grpc@@YA?AV?$shared_ptr@VChannel@grpc@@@std@@ABV?$basic_string@DU?$char_traits@D@std@@V?$allocator@D@2@@3@PAUgrpc_channel@@@Z)
  1&gt;C:\Tool\C++gRPC\grpc\vsprojects\\Debug\gflagsd.lib : warning LNK4272: library machine type 'x64' conflicts with target machine type 'X86'
  1&gt;C:\Tool\C++gRPC\grpc\vsprojects\Debug\greeter_client.exe : fatal error LNK1120: 8 unresolved externals
  ========== Build: 0 succeeded, 1 failed, 0 up-to-date, 0 skipped ==========
  </code></pre>
  
  <p>If anyone could offer a solution, I will be grateful.</p>