您好,登錄后才能下訂單哦!
進(jìn)入lib/cpp執(zhí)行make 編譯libthrift
1)./src/thrift/Thrift.h:48:39: fatal error: boost/utility/enable_if.hpp: No such file or directory
?#include <boost/utility/enable_if.hpp>
解決????yum install boost-devel
2)/opt/thrift-0.9.0/lib/cpp/.libs/libthrift.so: undefined reference to `SSL_accept'
/opt/thrift-0.9.0/lib/cpp/.libs/libthrift.so: undefined reference to `SSL_shutdown'
/opt/thrift-0.9.0/lib/cpp/.libs/libthrift.so: undefined reference to `SSL_get_shutdown'
/opt/thrift-0.9.0/lib/cpp/.libs/libthrift.so: undefined reference to `SSL_CTX_ctrl'
/opt/thrift-0.9.0/lib/cpp/.libs/libthrift.so: undefined reference to `X509_NAME_ENTRY_get_data'
/opt/thrift-0.9.0/lib/cpp/.libs/libthrift.so: undefined reference to `SSL_get_error'
/opt/thrift-0.9.0/lib/cpp/.libs/libthrift.so: undefined reference to `SSL_CTX_free'
collect2: error: ld returned 1 exit status
make[1]: *** [Benchmark] 錯(cuò)誤 1
make[1]: 離開(kāi)目錄“/opt/thrift-0.9.0/lib/cpp/test”
解決????修改編輯/opt/thrift-0.9.0/lib/cpp/test/Makefile文件,鏈接庫(kù)-lrt -lpthread 添加 -lssl -lcrtypto
編譯錯(cuò)誤:語(yǔ)法支持問(wèn)題
src/generate/t_rb_generator.cc: In member function ‘virtual void t_rb_generator::generate_enum(t_enum*)’:
src/generate/t_rb_generator.cc:359:11: error: operands to ?: have different types ‘bool’ and ‘std::basic_ostream<char>’
???? first ? first = false : f_types_ << ", ";
???? ~~~~~~^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
src/generate/t_rb_generator.cc:369:11: error: operands to ?: have different types ‘bool’ and ‘std::basic_ostream<char>’
???? first ? first = false : f_types_ << ", ";
???? ~~~~~~^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
make[3]: *** [Makefile:749: thrift-t_rb_generator.o] Error 1
make[3]: Leaving directory '/home/dong/thrift-0.9.0/compiler/cpp'
解決
將??? first ? first = false : f_types_ << ", ";
修改為
??? if(first)
??? {
??????????? first = false :
??? }
??? else
??? {
??????????? f_types_ << ", ";
??? }
免責(zé)聲明:本站發(fā)布的內(nèi)容(圖片、視頻和文字)以原創(chuàng)、轉(zhuǎn)載和分享為主,文章觀點(diǎn)不代表本網(wǎng)站立場(chǎng),如果涉及侵權(quán)請(qǐng)聯(lián)系站長(zhǎng)郵箱:is@yisu.com進(jìn)行舉報(bào),并提供相關(guān)證據(jù),一經(jīng)查實(shí),將立刻刪除涉嫌侵權(quán)內(nèi)容。