相关疑难解决方法(0)

无法读取符号:存档没有索引; 运行ranlib添加一个

我试着用图书馆制作

ar -r -c -s libtestlib.a *.o
Run Code Online (Sandbox Code Playgroud)

如本教程http://matrixprogramming.com/Tools/CompileLink.html中所述

但在链接库后出现错误

g++ -o uni2asc uni2asc.o -L../Modules -ltestlib

../Modules/libtestlib.a: could not read symbols: Archive has no index; run ranlib to add one
collect2: ld returned 1 exit status
Run Code Online (Sandbox Code Playgroud)

我尝试使用ranlib但仍然出现错误..我正在使用ubuntu9.10请为我建议一些解决方案

gcc

25
推荐指数
2
解决办法
6万
查看次数

标签 统计

gcc ×1