在構建1.35.0以及timesys arm-gcc工具鏈中的1.36.0時,靜態(鏈接靜態)以及動態(.so,默認選項)。用於gcc-arm工具鏈的Boost C++庫
然而,當我嘗試鏈接一個簡單的示例文件系統的應用程序:
#include <boost/filesystem.hpp>
#include <iostream>
namespace fs = boost::filesystem;
int main(int argc, char *argv[]) {
const char* fileName = argv[1];
std::cout << "file: " << fileName << " => " << fs::exists(fileName) << std::endl;
return 0;
}
我得到下面的連接錯誤:
[email protected]:~/boost/test$ /opt/timesys/at91sam9263_ek/toolchain/bin/armv5l-timesys-linux-gnueabi-gcc
exists.cpp -o exists.exe -I ../boost_1_35_0/ -lboost_filesystem -lboost_system -lstdc++ -L .
/tmp/ccex3NGb.o: In function `boost::detail::atomic_decrement(int*)':
exists.cpp:(.text._ZN5boost6detail16atomic_decrementEPi[boost::detail::atomic_decrement(int*)]+0x1c):
undefined reference to `__sync_fetch_and_add_4'
/tmp/ccex3NGb.o: In function `boost::detail::atomic_increment(int*)':
exists.cpp:(.text._ZN5boost6detail16atomic_incrementEPi[boost::detail::atomic_increment(int*)]+0x1c):
undefined reference to `__sync_fetch_and_add_4'
collect2: ld returned 1 exit status
有誰知道我怎樣才能加速打造爲gcc-arm工具鏈?