- 论坛徽章:
- 0
|
请问如何将C++代码编译链接生成不需要再链接动态库的程序?\r\n我使用\r\n# CC -lrt myapp.cxx \r\n#ldd a.out\r\n librt.so.1 =>; /usr/lib/librt.so.1\r\n libCrun.so.1 =>; /usr/lib/libCrun.so.1\r\n libm.so.1 =>; /usr/lib/libm.so.1\r\n libw.so.1 =>; /usr/lib/libw.so.1\r\n libc.so.1 =>; /usr/lib/libc.so.1\r\n libaio.so.1 =>; /usr/lib/libaio.so.1\r\n libmd5.so.1 =>; /usr/lib/libmd5.so.1\r\n libdl.so.1 =>; /usr/lib/libdl.so.1\r\n /usr/platform/SUNW,Sun-Blade-2500/lib/libc_psr.so.1\r\n /usr/platform/SUNW,Sun-Blade-2500/lib/libmd5_psr.so.1\r\n\r\n如何将这些目标代码链接进可执行文件,以后执行文件时就不需要再动态链接了? |
|