Giter Club home page Giter Club logo

grpc_getting_started's Introduction

grpc_getting_started

Overview

Getting started with grpc (in C++).

Building with bazel.

Building and Running the Code

To only build the server and client, run the following:

bazel build :greeter_server
bazel build :greeter_client

To build and run the server and client, run the following:

bazel run :greeter_server
bazel run :greeter_client

grpc_getting_started's People

Contributors

arcticmatt avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar

grpc_getting_started's Issues

Only works until v1.49 (but .bazelrc std=c++14 fixs it)

After v1.49, you need to enforce c++14 on the project.
Create .bazelrc file with content: build --cxxopt='-std=c++14'

Example for v1.51.1 (on WORKSPACE):

# v1.51.1 0a82c02a9b817a53574994374dcff53f2e961df2
http_archive(
    name = "com_github_grpc_grpc",
    urls = [
        "https://github.com/grpc/grpc/archive/0a82c02a9b817a53574994374dcff53f2e961df2.tar.gz",
    ],
    strip_prefix = "grpc-0a82c02a9b817a53574994374dcff53f2e961df2",
)
load("@com_github_grpc_grpc//bazel:grpc_deps.bzl", "grpc_deps")
grpc_deps()
load("@com_github_grpc_grpc//bazel:grpc_extra_deps.bzl", "grpc_extra_deps")
grpc_extra_deps()

bazel build error on windows

Hi, extremely thankful for providing this easy bazel gRPC template. I am running into an issue when using the bazel build command on my windows PC. I was wondering if you could provide some guidance. Here's the output of running "bazel build :greeter_server",

ERROR: D:/work/git/tutorials/grpc/grpc_getting_started/BUILD:35:16: Action helloworld.grpc.pb.h failed (Exit -1073741515): protoc.exe failed: error executing command
cd C:/users/bj3pgh/_bazel_bj3pgh/4ot2dzx3/execroot/main
bazel-out/host/bin/external/com_google_protobuf/protoc.exe --plugin=protoc-gen-PLUGIN=bazel-out/host/bin/external/com_github_grpc_grpc/src/compiler/grpc_cpp_plugin.exe --PLUGIN_out=bazel-out/x64_windows-fastbuild/bin --proto_path=. --proto_path=bazel-out/x64_windows-fastbuild/bin helloworld.proto
Execution platform: @local_config_platform//:host
Target //:greeter_client failed to build
ERROR: D:/work/git/tutorials/grpc/grpc_getting_started/BUILD:35:16 Action helloworld.grpc.pb.h failed (Exit -1073741515): protoc.exe failed: error executing command
cd C:/users/bj3pgh/_bazel_bj3pgh/4ot2dzx3/execroot/main
bazel-out/host/bin/external/com_google_protobuf/protoc.exe --plugin=protoc-gen-PLUGIN=bazel-out/host/bin/external/com_github_grpc_grpc/src/compiler/grpc_cpp_plugin.exe --PLUGIN_out=bazel-out/x64_windows-fastbuild/bin --proto_path=. --proto_path=bazel-out/x64_windows-fastbuild/bin helloworld.proto
Execution platform: @local_config_platform//:host
INFO: Elapsed time: 1.575s, Critical Path: 0.44s
INFO: 14 processes: 14 internal.
FAILED: Build did NOT complete successfully

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.