$ g++ helloworld.pb.o helloworld.grpc.pb.o greeter_lib.o -L/usr/local/lib `pkg-config --libs grpc++ grpc` -lprotobuf -lpthread -ldl -shared -o greeter.so
$ g++ helloworld.pb.o helloworld.grpc.pb.o greeter_lib.o -L/usr/local/lib `pkg-config --libs grpc++ grpc` -lprotobuf -lpthread -ldl -bundle -o greeter.bundle
When I run this, calling newClient works great! When I call sayHello I get a null pointer exception:
Registered platform support modules in: 0.037474s.
Native extension for OSXStandalone target not found
Load scene 'Temp/__Backupscenes/0.backup' time: 0.633909 ms
D0722 14:37:02.336402000 140735245529088 ev_posix.c:106] Using polling engine: poll
Receiving unhandled NULL exception
Launching bug reporter
Obtained 33 stack frames.
#0 0x000001253a96ce in helloworld::Greeter::Stub::SayHello(grpc::ClientContext*, helloworld::HelloRequest const&, helloworld::HelloReply*)
#1 0x000001253b6c04 in GreeterClient::sayHello(char const*)
#2 0x000001253b640b in GreeterClient_sayHello
#3 0x000001251d311a in (wrapper managed-to-native) HelloWorldRpc:GreeterClient_sayHello (int,string) + 0x11a (0x1251d3000 0x1251d31fa) [0x116542660 - Unity Child Domain]
#4 0x000001251d2d4e in HelloWorldRpc:Start () + 0x9e (0x1251d2cb0 0x1251d2e44) [0x116542660 - Unity Child Domain]
#5 0x000001219bf38a in (wrapper runtime-invoke) object:runtime_invoke_void__this__ (object,intptr,intptr,intptr) + 0xfa (0x1219bf290 0x1219bf4bd) [0x116542660 - Unity Child Domain]
#6 0x00000109bb90a0 in mono_get_runtime_build_info
#7 0x00000109ce73ca in mono_runtime_invoke
#8 0x0000010115e502 in ScriptingInvocation::Invoke(MonoException**, bool)
#9 0x00000101138374 in MonoBehaviour::InvokeMethodOrCoroutineChecked(ScriptingMethodMono, MonoObject*, MonoException**)
#10 0x00000101138638 in MonoBehaviour::InvokeMethodOrCoroutineChecked(ScriptingMethodMono, MonoObject*)
#11 0x00000100d2adea in DelayedCallManager::Update(int)
#12 0x00000101011e3f in PlayerLoop(bool, bool, IHookEvent*)
#13 0x000001019f92fd in Application::UpdateScene(bool)
#14 0x000001019f9873 in Application::EnterPlayMode(bool)
#15 0x000001019f6648 in Application::SetIsPlaying(bool)
#16 0x000001019f5f2a in Application::TickTimer()
#17 0x007fff940d3dec in __NSFireTimer
#18 0x007fff895cfb94 in __CFRUNLOOP_IS_CALLING_OUT_TO_A_TIMER_CALLBACK_FUNCTION__
#19 0x007fff895cf823 in __CFRunLoopDoTimer
#20 0x007fff895cf37a in __CFRunLoopDoTimers
#21 0x007fff895c6871 in __CFRunLoopRun
#22 0x007fff895c5ed8 in CFRunLoopRunSpecific
#23 0x007fff9b1cf935 in RunCurrentEventLoopInMode
#24 0x007fff9b1cf76f in ReceiveNextEventCommon
#25 0x007fff9b1cf5af in _BlockUntilNextEventMatchingListInModeWithFilter
#26 0x007fff9b534df6 in _DPSNextEvent
#27 0x007fff9b534226 in -[NSApplication _nextEventMatchingEventMask:untilDate:inMode:dequeue:]
#28 0x007fff9b528d80 in -[NSApplication run]
#29 0x007fff9b4f2368 in NSApplicationMain
#30 0x00000101c5a838 in EditorMain(int, char const**)
#31 0x00000101c5aee9 in main
#32 0x000001000020c4 in start
Launching external process: /Applications/Unity/Unity.app/Contents/BugReporter/Unity Bug Reporter.app/Contents/MacOS/unity.bugreporter.exe