I am trying to build test.cpp with command: arm-none-linux-gnueabi-g++ test.cpp -o test
and I put command readelf -d test
in terminal, the output is like this:
0x0000001(NEEDED) share library:[libm.so.6]
0x0000001(NEEDED) share library:[libstdc++.so.6]
0x0000001(NEEDED) share library:[libgcc_s.so.1]
0x0000001(NEEDED) share library:[libc.so.6]
It's not what I expect, the expected result is:
0x0000001(NEEDED) share library:[libm.so]
0x0000001(NEEDED) share library:[libstdc++.so]
0x0000001(NEEDED) share library:[libgcc_s.so]
0x0000001(NEEDED) share library:[libc.so]
I found out that there are link files(libstdc++.so
, libc.so
) in arm-none-gnueabi lib, so I want to know if there is a parameter for g++ to link libstdc++.so
, libc.so
, libgcc_s.so
,...?
I hope someone can solving this problem. Thank you very much!
test.cpp
code as follows:
#include<iostream>
int main(void)
{
std::cout << "Hello World" << std::endl;
return 0;
}
gcc version is 4.8.3 20140320.