[英]Custom GCC 4.8.2 on RHEL6 gives build error with std::shared_ptr
[英]Raspberry PI GCC 4.8.2 build boost 1.56 atomic error
我試圖在樹莓派上使用c ++ 11構建1.56 Boost庫。 大多數庫都在構建正確的庫,但是boost atomic會產生以下錯誤:
構建Boost C ++庫。
Component configuration: - atomic : building - chrono : not building - container : not building - context : not building - coroutine : not building - date_time : not building - exception : not building - filesystem : not building - graph : not building - graph_parallel : not building - iostreams : not building - locale : not building - log : not building - math : not building - mpi : not building - program_options : not building - python : not building - random : not building - regex : not building - serialization : not building - signals : not building - system : not building - test : not building - thread : not building - timer : not building - wave : not building ...found 129 targets... ...updating 8 targets... gcc.compile.c++ bin.v2/libs/atomic/build/gcc-4.8/release/threading-multi/lockpool.o g++: error: unrecognized command line option '-std=cxx11' "g++" -ftemplate-depth-128 -O3 -finline-functions -Wno-inline -Wall -pthread -fPIC -std=cxx11 -DBOOST_ALL_NO_LIB=1 -DBOOST_ATOMIC_DYN_LINK=1 -DBOOST_ATOMIC_SOURCE -DNDEBUG -I"." -c -o "bin.v2/libs/atomic/build/gcc-4.8/release/threading-multi/lockpool.o"
“庫/原子/ SRC / lockpool.cpp”
...failed gcc.compile.c++ bin.v2/libs/atomic/build/gcc-4.8/release/threading-multi/lockpool.o... ...skipped <pbin.v2/libs/atomic/build/gcc-4.8/release/threading-multi>libboost_atomic.so.1.56.0
由於缺少lockpool.o ... ...由於缺少libboost_atomic.so.1.56.0而跳過了libboost_atomic.so.1.56.0 ... ...由於缺乏libboost_atomic.so.1.56.0而跳過了libboost_atomic.so ... gcc.compile.c ++ bin.v2 / libs / atomic / build / gcc-4.8 / release / link-static / threading-multi / lockpool.o g ++:錯誤:無法識別的命令行選項'-std = cxx11'
"g++" -ftemplate-depth-128 -O3 -finline-functions -Wno-inline -Wall -pthread -std=cxx11 -DBOOST_ALL_NO_LIB=1 -DBOOST_ATOMIC_SOURCE -DBOOST_ATOMIC_STATIC_LINK=1 -DNDEBUG -I"." -c -o "bin.v2/libs/atomic/build/gcc-4.8/release/link-static/threading-multi/lockpool.o"
“庫/原子/ SRC / lockpool.cpp”
...failed gcc.compile.c++ bin.v2/libs/atomic/build/gcc-4.8/release/link-static/threading-multi/lockpool.o... ...skipped <pbin.v2/libs/atomic/build/gcc-4.8/release/link-static/threading-multi>libboost_atomic.a(clean)
由於缺少lockpool.o ... ...跳過了libboost_atomic.a,因為缺少lockpool.o ... ...由於缺少libboost_atomic.a,跳過了libboost_atomic.a ... ...無法更新2個目標。 ...跳過了6個目標...
我做了:
./bootstrap --with-libraries=atomic
./b2 cxxflags="-std=cxx11"
有人知道我能做什么嗎?
正確的標志是-std=c++11
,而不是-std=cxx11
。 只需使用以下命令運行命令:
./b2 cxxflags="-std=c++11"
聲明:本站的技術帖子網頁,遵循CC BY-SA 4.0協議,如果您需要轉載,請注明本站網址或者原文地址。任何問題請咨詢:yoyou2525@163.com.