我试着用图书馆制作
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 ×1