You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
I have built a gRPC 1.62.1 C++ nuget package using cmake.
When I consume this gRPC package in my project I get the errors shown below. After investigating it the compilation error is happening when we compile the protobuf generated code. This code uses the algorthim\container.h which implements the c_sample(). This uses the std::uniform_int_distribution.
The solution seems to be if you include the random header in container.h the compilation errors do not occur.
Create a simple proto file and run the protoc.exe against it to generate C++ files.
Now using VS2022 compile the file and you will get 1>C:\Git\spectrum.pagehandlerclient\packages\grpc.cpp.static.x64.1.62.1\build\native\x64\Debug\include\absl\algorithm\container.h(797,14): error C2039: 'uniform_int_distribution': is not a member of 'std' 1>(compiling source file 'codegen/PageServiceV1.grpc.pb.cc') 1>C:\Program Files\Microsoft Visual Studio\2022\Enterprise\VC\Tools\MSVC\14.39.33519\include\unordered_set(23,1): 1>see declaration of 'std'
What version of Abseil are you using?
Abseil 20240116.0
Protobuf v3.25.1
gRPC 1.621
What operating system and version are you using?
Windows 11
Version 22H2 (22621.3447)
What compiler and version are you using?
Microsoft Visual Studio Enterprise 2022 (2) (64-bit) - Current
Version 17.9.6
What build system are you using?
NA
Additional context
No response
The text was updated successfully, but these errors were encountered:
Describe the issue
What happened
I have built a gRPC 1.62.1 C++ nuget package using cmake.
When I consume this gRPC package in my project I get the errors shown below. After investigating it the compilation error is happening when we compile the protobuf generated code. This code uses the algorthim\container.h which implements the c_sample(). This uses the std::uniform_int_distribution.
The solution seems to be if you include the random header in container.h the compilation errors do not occur.
This has also been reported against protobuf 16475
Steps to reproduce the problem
Create a simple proto file and run the protoc.exe against it to generate C++ files.
Now using VS2022 compile the file and you will get
1>C:\Git\spectrum.pagehandlerclient\packages\grpc.cpp.static.x64.1.62.1\build\native\x64\Debug\include\absl\algorithm\container.h(797,14): error C2039: 'uniform_int_distribution': is not a member of 'std' 1>(compiling source file 'codegen/PageServiceV1.grpc.pb.cc') 1>C:\Program Files\Microsoft Visual Studio\2022\Enterprise\VC\Tools\MSVC\14.39.33519\include\unordered_set(23,1): 1>see declaration of 'std'
What version of Abseil are you using?
Abseil 20240116.0
Protobuf v3.25.1
gRPC 1.621
What operating system and version are you using?
Windows 11
Version 22H2 (22621.3447)
What compiler and version are you using?
Microsoft Visual Studio Enterprise 2022 (2) (64-bit) - Current
Version 17.9.6
What build system are you using?
NA
Additional context
No response
The text was updated successfully, but these errors were encountered: