gokul svg
gokul svg

Reputation: 41

I am facing issue regarding the compilation of grpc cpp code in visual studio

I made a sample code for working learning grpc in cpp and compiled it in visual studio 2019. I keep on getting an error

port_platform.h(53,1): error C1189:  #error:      "Please compile grpc with _WIN32_WINNT of at least 0x600 (aka Windows Vista)"

Upvotes: 2

Views: 891

Answers (1)

Stéphane
Stéphane

Reputation: 20340

Also ran into this today. Solved it by manually editing these two files:

  • C:\src\vcpkg\installed\x64-windows\include\grpc\impl\codegen\port_platform.h
  • C:\src\vcpkg\installed\x86-windows\include\grpc\impl\codegen\port_platform.h

...to insert this text around line 32 in both of the files:

#if defined(_WIN64) || defined(WIN64) || defined(_WIN32) || defined(WIN32)
+#include <SDKDDKVer.h>
#ifndef WIN32_LEAN_AND_MEAN

I didn't come up with this solution. Found it here: https://github.com/grpc/grpc/issues/18928#issuecomment-494171557

Upvotes: 1

Related Questions