Getting gRPC working in c++ VS2017 from scratch without CMake

  c++, grpc, visual-studio-2017

This question might seem as already asked, but trust me when I say there is not place where this question is explained clearly.

I got gRPC using vcpkg. The idea is to get its helloworld project working without using CMake, just by creating a new empty project from scratch and doing everything manually.

My system is running on W10 OS and my c++ IDE is MS VS 2017. The link to github source code is:

I am able to use protoc.exe on the protocol buffer format file in this link:

It generates two .h and two .cc (for both pb and grpc) that I copy in the same folder than the project.

gRPC discourages the use of dynamic libraries, so I will use static linking. My installation directory is in c:/vcpg/installed/x86-windows and has the normal include, lib and bin folder of any project, along with a tools folder containing grpc plugins, openssl and protobuf.

I tried to link with grpc.lib and grpc++.lib just dragging them into the project for static linking, but when I compile, I just got hundreds of linker errors. I also try to just add the rest of .lib in the lib folder, but the linker keeps complaining.

I don’t know what else to do. Does someone know how to get gRPC working in VS 2017 without using CMake, just telling me what libraries,static or dynamic, are needed?

Thanks a lot

Source: Windows Questions C++