[galib] "Archive has no index" Error

matthew wall mbwall at MIT.EDU
Wed Apr 5 11:45:20 EDT 2006


On 05 Apr 2006, at 11:19, Zheng, Lin ERDC-TEC-VA wrote:

> Hi All,
>     I have successfully compiled the ga library on Linux using g+ 
> +.  When I was trying to build a source file, the compiler returned  
> the following error:
> "/local/Experiments/lib/libga.a: could not read symbols: Archive  
> has no index; run ranlib to add one
> collect2: ld returned 1 exit status"
>    I ran ranlib several times, but the compiler still gave the same  
> error.  I tried to search and understand what "ranlib" means, but  
> it was just confusing.
>   Should I rebuild the library again?  Did any of you had the same  
> problem before?  Please give me some advices or suggestions.  Any  
> help would be greatly appreciated.
>
> Thanks
> Lin
>

on which platform are you building (i.e. which flavor of linux, which  
version of linux, which cpu type/architecture, which compiler  
version)?  how did you run ranlib?

running ranlib should be as simple as this:

ranlib libga.a

then you should be able to link against libga.a.  typically ranlib is  
only needed on macosx and aix on the ppc architectures, so please let  
us know your platform details.



More information about the galib mailing list