Win10, Visual Studio 15 2017
That's what I've done so far:
- cloned grpc and the submodules from github
cmake --buildon grpc- generated pb.cc and pb.h files from my proto-files
- added grpc and protobuf to VC++ Directories, Include Directories
- added zlib, grpc and protobuf to VC++ Directories, Library Directories
- added zlib.lib, gpr.lib, grpc.lib, grpc++.lib and libprotobuf.lib to Linker, Input, Additional Dependencies
- added Preprocessor Definitions: _WIN32_WINNT=0x600; NDEBUG
- changed Runtime Library to /MD
After that my empty project including the pb-files compiled without an error.
Then I wrote some code to use and test grpc but when I try to compile this time, I'm getting several errors like
LNK2019 unresolved external symbol _address_sorting_init referenced in function "void __cdecl grpc_resolver_dns_ares_init(void)" (?grpc_resolver_dns_ares_init@@YAXXZ) grpc.lib(dns_resolver_ares.obj)
LNK2001 unresolved external symbol __imp__htons@4 grpc.lib(socket_utils_windows.obj)
LNK2019 unresolved external symbol _ares_gethostbyname referenced in function "struct grpc_ares_request * __cdecl grpc_dns_lookup_ares_continue_after_check_localhost_and_ip_literals_locked(char const *,char const *,char const *,struct grpc_pollset_set *,struct grpc_closure *,struct grpc_lb_addresses * *,bool,char * *,struct grpc_combiner *)" (?grpc_dns_lookup_ares_continue_after_check_localhost_and_ip_literals_locked@@YAPAUgrpc_ares_request@@PBD00PAUgrpc_pollset_set@@PAUgrpc_closure@@PAPAUgrpc_lb_addresses@@_NPAPADPAUgrpc_combiner@@@Z) grpc.lib(grpc_ares_wrapper.obj)