aboutsummaryrefslogtreecommitdiffhomepage
path: root/examples/cpp/helloworld
diff options
context:
space:
mode:
authorGravatar Yuchen Zeng <zyc@google.com>2016-07-07 14:17:32 -0700
committerGravatar Yuchen Zeng <zyc@google.com>2016-07-07 14:19:04 -0700
commit1c58bd221da3f67cc612149b99a7efe49bb884cb (patch)
treed57383b604af0fbd473ce366f094aae2ad5be225 /examples/cpp/helloworld
parente705dc44a1d850457f700a66089ef9fcd463178b (diff)
Enable server reflection in c++ examples
Diffstat (limited to 'examples/cpp/helloworld')
-rw-r--r--examples/cpp/helloworld/Makefile4
1 files changed, 3 insertions, 1 deletions
diff --git a/examples/cpp/helloworld/Makefile b/examples/cpp/helloworld/Makefile
index 780e5e427a..a632f1b126 100644
--- a/examples/cpp/helloworld/Makefile
+++ b/examples/cpp/helloworld/Makefile
@@ -32,7 +32,9 @@
CXX = g++
CPPFLAGS += -I/usr/local/include -pthread
CXXFLAGS += -std=c++11
-LDFLAGS += -L/usr/local/lib `pkg-config --libs grpc++ grpc` -lprotobuf -lpthread -ldl
+LDFLAGS += -L/usr/local/lib `pkg-config --libs grpc++ grpc` \
+ -Wl,--no-as-needed -lgrpc++_reflection -Wl,--as-needed \
+ -lprotobuf -lpthread -ldl
PROTOC = protoc
GRPC_CPP_PLUGIN = grpc_cpp_plugin
GRPC_CPP_PLUGIN_PATH ?= `which $(GRPC_CPP_PLUGIN)`