Chinaunix

标题: 在aix下用gcc编译问题 [打印本页]

作者: yygk2000    时间: 2011-07-27 09:10
标题: 在aix下用gcc编译问题
我编译了一个动态库libmyapi.so
然后编译测试程序,测试程序和库在同一个目录
gcc -o test test.c -L. -lmyapi

返回提示:
ld: 0706-006 Cannot find or open library file: -l myapi
        ldpen(): A file or directory in the path name does not exist.
collect2: ld returned 255 exit status

但是使用
gcc -o test test.c -L. libmyapi.so
就可以编译过,而且test也能正常运行

请高手指教,上面方式有何问题?
作者: tansijie    时间: 2011-08-16 13:15
将 -L. 换成-L./试试




欢迎光临 Chinaunix (http://bbs.chinaunix.net/) Powered by Discuz! X3.2