|
|
问一个简单的共享库的问题
- # Create shared library.
- # Use -lc to link it against C library, since libhello
- # depends on the C library.
- gcc -g -shared -Wl,-soname,libhello.so.0 \
- -o libhello.so.0.0 libhello.o -lc
复制代码
出现这样的错误:
- [root@root Other]# gcc -g -shared -Wl, -libhello.so, -o libhello.so.0.0 libhello.o -lc
- gcc -g -shared -Wl, -libhello.so, -o libhello.so.0.0 libhello.o -lc
- /usr/bin/ld: : No such file: No such file or directory
- collect2: ld returned 1 exit status
- [root@root Other]#
复制代码 |
|