Home > Back-end >  Compilation fails question BRPC examples
Compilation fails question BRPC examples

Time:10-28

In BRPC example example/parallel_echo_c + +, use the make compile time, times wrong the link below:

Linking echo_server
G + + -/usr/lib64 - l. L./../output/lib - Xlinker "- (" echo. Pb. O server o - Wl - Bstatic - LBRPC - Wl, Bdynamic - Xlinker" -) "- lpthread - LSSL - lcrypto - LDL - lz - LRT - lgflags - lprotobuf - lleveldb - lthriftnb - levent - lthrift - ltcmalloc_and_profiler - lglog -o echo_server
./../output/lib/libbrpc. A. (server. O) : In the function ` BRPC: : server: : StartInternal (in_addr const& , BRPC: : PortRange const& , BRPC: : ServerOptions const *) ':
/home/Tom/local/BRPC/incubator - BRPC/SRC/BRPC/server. The CPP: 813: undefined reference to ` __cxa_throw_bad_array_new_length '
./../output/lib/libbrpc. (ssl_helper. O) : a function In ` _M_check ':
/usr/local/gcc4.9.2/include/c + +/4.9.2/bits/basic_string. H: 324: undefined reference to ` STD: : __throw_out_of_range_fmt (char const *,... ) '

But the link command g + + -/usr/lib64 - l. L./../output/lib - Xlinker "- (" echo. Pb. O server o - Wl - Bstatic - LBRPC - Wl, Bdynamic - Xlinker" -) "- lpthread - LSSL - lcrypto - LDL - lz - LRT - lgflags - lprotobuf - lleveldb - lthriftnb - levent - lthrift - ltcmalloc_and_profiler - lglog -o echo_server
G + + instead of GCC to compile successfully,

Want to ask the reason where? Thank you very much!
  • Related