解決 error: ‘struct std::__cxx11::basic_stringbuf問題

編譯srs時遇到 如下錯誤

g++ -I../../objs/gtest/include -g -Wall -Wextra -O0  -I../../src/utest -I../../src/core -I../../src/kernel -I../../src/protocol -I../../src/service -I../../src/app -I../../objs -I../../objs/st -I../../objs/openssl/include  -c ../../src/utest/srs_utest.cpp -o srs_utest.o
In file included from ../../objs/gtest/include/gtest/internal/gtest-port.h:197,
                 from ../../objs/gtest/include/gtest/internal/gtest-internal.h:40,
                 from ../../objs/gtest/include/gtest/gtest.h:57,
                 from ../../src/utest/srs_utest.hpp:36,
                 from ../../src/utest/srs_utest.cpp:24:
/usr/include/c++/8/sstream:301:7: error: ‘struct std::__cxx11::basic_stringbuf<_CharT, _Traits, _Alloc>::__xfer_bufptrs’ redeclared with different access
       struct __xfer_bufptrs
       ^~~~~~
make[2]: *** [Makefile:92:srs_utest.o] 錯誤 1
make[2]: 離開目錄“/home/sunday/soft/srs-3.0-b3/trunk/objs/utest”
make[1]: *** [Makefile:115:utest] 錯誤 2
make[1]: 離開目錄“/home/sunday/soft/srs-3.0-b3/trunk”
make: *** [Makefile:8:default] 錯誤 2
 

編譯時要加一個選項 

./configure --without-utest

解決問題,在引記錄下

發表評論
所有評論
還沒有人評論,想成為第一個評論的人麼? 請在上方評論欄輸入並且點擊發布.
相關文章