- 链接顺序
1 2 3 4 5 6 7 8 9 10 11
This is because the linker resolves symbols in the order that the libraries are listed on the command line. If a library is listed before the library it depends on, the linker will not be able to resolve the symbols, resulting in an error. So, in the example I gave earlier: A depends on B B depends on C The correct linking order would actually be: A B C
- 查看依赖的库
```
- on target platform
ldd
- not on target platform
objdump -x
| grep NEEDED readelf -d | grep NEEDED nm -D | grep NEEDED elfdump -d | grep NEEDED ``` 3.恢复默认的交叉编译选项 `unset LD_LIBRARY_PATH`
- on target platform
ldd