在linux上构建firebase消息传递testapp

时间:2017-11-03 11:39:14

标签: c++ linux c++11 firebase

我尝试使用此命令构建quickstart-cpp中包含的桌面(linux)的消息传递测试应用程序:

cd ~/quickstart-cpp/messaging/testapp/src/desktop
g++ -std=c++11 -o desktop_main desktop_main.cc ../common_main.cc -I.. -I~/firebase_cpp_sdk/include -L~/firebase_cpp_sdk/libs/linux -lmessaging -lapp -lpthread -lstdc++

但我得到了:

/home/carbeman/firebase_cpp_sdk/libs/linux/libmessaging.a(common.o): In function `firebase::messaging::SetListener(firebase::messaging::Listener*)':
/proc/self/cwd/firebase/messaging/client/cpp/src/common.cc:47: undefined reference to `operator delete(void*, unsigned long)'
/home/carbeman/firebase_cpp_sdk/libs/linux/libmessaging.a(common.o): In function `__gnu_cxx::new_allocator<firebase::messaging::Message>::deallocate(firebase::messaging::Message*, unsigned long)':
/proc/self/cwd/third_party/crosstool/v18/stable/toolchain/bin/../lib/gcc/x86_64-grtev4-linux-gnu/4.9.x-google/../../../../x86_64-grtev4-linux-gnu/include/c++/4.9.x-google/ext/new_allocator.h:134: undefined reference to `operator delete(void*, unsigned long)'
/home/carbeman/firebase_cpp_sdk/libs/linux/libmessaging.a(common.o): In function `__gnu_cxx::new_allocator<firebase::messaging::Message*>::deallocate(firebase::messaging::Message**, unsigned long)':
/proc/self/cwd/third_party/crosstool/v18/stable/toolchain/bin/../lib/gcc/x86_64-grtev4-linux-gnu/4.9.x-google/../../../../x86_64-grtev4-linux-gnu/include/c++/4.9.x-google/ext/new_allocator.h:134: undefined reference to `operator delete(void*, unsigned long)'
/home/carbeman/firebase_cpp_sdk/libs/linux/libmessaging.a(common.o): In function `~PollableListener':
/proc/self/cwd/firebase/messaging/client/cpp/src/common.cc:148: undefined reference to `operator delete(void*, unsigned long)'
/home/carbeman/firebase_cpp_sdk/libs/linux/libmessaging.a(common.o): In function `__gnu_cxx::new_allocator<firebase::messaging::Message>::deallocate(firebase::messaging::Message*, unsigned long)':
/proc/self/cwd/third_party/crosstool/v18/stable/toolchain/bin/../lib/gcc/x86_64-grtev4-linux-gnu/4.9.x-google/../../../../x86_64-grtev4-linux-gnu/include/c++/4.9.x-google/ext/new_allocator.h:134: undefined reference to `operator delete(void*, unsigned long)'
/home/carbeman/firebase_cpp_sdk/libs/linux/libmessaging.a(common.o):/proc/self/cwd/third_party/crosstool/v18/stable/toolchain/bin/../lib/gcc/x86_64-grtev4-linux-gnu/4.9.x-google/../../../../x86_64-grtev4-linux-gnu/include/c++/4.9.x-google/ext/new_allocator.h:134: more undefined references to `operator delete(void*, unsigned long)' follow
collect2: error: ld returned 1 exit status

我的g ++版本是4.9.2。 我做错了什么?

0 个答案:

没有答案