I tried building gRPC v1.4.0 with Visual Studio 2017 and I encountered the 
following error, any ideas?  I am using a slightly modified version of the 
following script to perform the build (the slight modifications were to 
target vs 2017).  This build procedure worked fine for grpc v1.0.0.    The 
problem is only a warning but the build project is set to stop on warnings. 
 I'll temporarily change the compiler settings for both the grpc++ and 
grpc++_unsecure projects (the generic_stub.cc is present in both projects) 
to not treat warnings as errors (/WX-), however it would be preferable to 
fix the underlying problem.

John


  /// Create a stream and write the first request out.
  /// \a tag will be notified on \a cq when the call has been started (i.e.
  /// intitial metadata sent).
  /// Note that \a context will be used to fill in custom initial metadata
  /// used to send to the server when starting the call.
  static ClientAsyncReaderWriter* Create(ChannelInterface* channel,
                                         CompletionQueue* cq,
                                         const RpcMethod& method,
                                         ClientContext* context, void* tag) {
    Call call = channel->CreateCall(method, context, cq);

    return new (g_core_codegen_interface->grpc_call_arena_alloc(
        call.call(), sizeof(ClientAsyncReaderWriter)))        
ClientAsyncReaderWriter(call, context, tag); // build fails here
  }


https://github.com/plasticbox/grpc-windows/blob/master/grpc_build.bat


2>c:\users\johnc\main\extlibs\grpc-1.4.0\include\grpc++\impl\codegen\
async_stream.h(419): error C2220: warning treated as error - no 'object' 
file generated
2>c:\users\johnc\main\extlibs\grpc-1.4.0\include\grpc++\impl\codegen\async_stream.h(414):
 
note: while compiling class template member function 
'grpc::ClientAsyncReaderWriter<grpc::ByteBuffer,grpc::ByteBuffer> 
*grpc::ClientAsyncReaderWriter<grpc::ByteBuffer,grpc::ByteBuffer>::Create(grpc::ChannelInterface
 
*,grpc::CompletionQueue *,const grpc::RpcMethod &,grpc::ClientContext 
*,void *)'
2>c:\users\johnc\main\extlibs\grpc-1.4.0\src\cpp\client\generic_stub.cc(44): 
note: see reference to function template instantiation 
'grpc::ClientAsyncReaderWriter<grpc::ByteBuffer,grpc::ByteBuffer> 
*grpc::ClientAsyncReaderWriter<grpc::ByteBuffer,grpc::ByteBuffer>::Create(grpc::ChannelInterface
 
*,grpc::CompletionQueue *,const grpc::RpcMethod &,grpc::ClientContext 
*,void *)' being compiled
2>c:\users\johnc\main\extlibs\grpc-1.4.0\src\cpp\client\generic_stub.cc(45): 
note: see reference to class template instantiation 
'grpc::ClientAsyncReaderWriter<grpc::ByteBuffer,grpc::ByteBuffer>' being 
compiled
2>c:\users\johnc\main\extlibs\grpc-1.4.0\include\grpc++\impl\codegen\async_stream.h(419):
 
warning C4291: 'void *operator new(::size_t,void *) throw()': no matching 
operator delete found; memory will not be freed if initialization throws an 
exception
2>c:\program files (x86)\microsoft visual 
studio\2017\community\vc\tools\msvc\14.10.25017\include\vcruntime_new.h(90): 
note: see declaration of 'operator new'
2>credentials_cc.cc
2>create_channel_posix.cc
2>create_channel_internal.cc
2>create_channel.cc
2>client_context.cc
2>channel_cc.cc
2>insecure_server_credentials.cc
2>insecure_create_auth_context.cc
2>insecure_credentials.cc
2>Generating Code...
2>Done building project "grpc++_unsecure.vcxproj" -- FAILED.
========== Build: 1 succeeded, 1 failed, 2 up-to-date, 0 skipped ==========
Press any key to continue . . .

-- 
You received this message because you are subscribed to the Google Groups 
"grpc.io" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to [email protected].
To post to this group, send email to [email protected].
Visit this group at https://groups.google.com/group/grpc-io.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/grpc-io/77dbff37-a58e-4c14-be6c-4f2a4fb74dad%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.

Reply via email to