c*****z 发帖数: 182 | 1 我在编译的时候使用了-static选项
而且我的库文件都是*.a
但是我用 ldd executable_name
发现还是有很多动态库
我还能做些什么呢,谢谢! | t****t 发帖数: 6806 | 2 if you are doing correct, you shouldn't be able to use ldd on your
executable, since your executable will not be a dynamic object at all
【在 c*****z 的大作中提到】 : 我在编译的时候使用了-static选项 : 而且我的库文件都是*.a : 但是我用 ldd executable_name : 发现还是有很多动态库 : 我还能做些什么呢,谢谢!
| c*****z 发帖数: 182 | 3 yes, but the dlls are linuxgate, libz, libc and some other stuff that have
nothing to do with my own libariires, how can i get rid of them? thanks
【在 t****t 的大作中提到】 : if you are doing correct, you shouldn't be able to use ldd on your : executable, since your executable will not be a dynamic object at all
| t****t 发帖数: 6806 | 4 you don't even tell us what command you use, so -- STFW
【在 c*****z 的大作中提到】 : yes, but the dlls are linuxgate, libz, libc and some other stuff that have : nothing to do with my own libariires, how can i get rid of them? thanks
| l****i 发帖数: 43 | 5 try this
g++ -static-libgcc -static test.cc
if you still see some lib is dynamically linked, e.g., libc
you can try following
ln -s `g++ -print-file-name=libc.a`
then
g++ -static-libgcc -static test.cc
This may help |
|