grpc C++ windows

519 views
Skip to first unread message

smita deshpande

unread,
Aug 4, 2023, 5:04:36 PM8/4/23
to grpc.io
Hi, 
I am trying to write a sample C++ grpc example on Windows. 
I was able to build grpc.sln in visual studio as given https://github.com/grpc/grpc/blob/master/BUILDING.md. I can see the grpc.lib and grpc++.lib being generated too. I can see the protoc.exe and libprotobuf which probably I need to link too. 
But I am not sure how to go about it for next step as in generate pb.cc and pb.h files using protoc. I am following some of the links below, I have only found people using vcpkg to generate it. I was wondering if I can write a simple CMakelists.txt to set the paths for the variables. Below links:

 e.g._PROTOBUF_LIBPROTOBUF, _GRPC_CPP_PLUGIN_EXECUTABLE, _GRPC_GRPCPP. 
I have not been able to carry out 
cmake .. -Dgrpc_INSTALL=ON step and make install. Getting error for nothing to make. I tried make clean and then make again and I got following error. Where does grpc and required libraries get installed on doing make install?
Picture1.png

smita deshpande

unread,
Aug 4, 2023, 5:34:37 PM8/4/23
to grpc.io
I am getting below error if I do 
 cmake ./.. -DgRPC_INSTALL=ON -DCMAKE_BUILD_TYPE=Release -DgRPC_ABSL_PROVIDER=package -DgRPC_CARES_PROVIDER=package -DgRPC_RE2_PROVIDER=package -DgRPC_SSL_PROVIDER=package -DgRPC_ZLIB_PROVIDER=packagePicture1.png

Can someone help on building and running C++ on windows? 

Thanks,
Smita

smita deshpande

unread,
Aug 7, 2023, 10:21:36 AM8/7/23
to grpc.io
Hello again, 

I used vcpkg and i was able to resolve this error. 

Thanks,
Smita

Reply all
Reply to author
Forward
Message has been deleted
0 new messages