darkworks
darkworks

Reputation: 63

Archive has no index; run ranlib to add one in Dev C++

I converted mysqlclient.lib to mysqlclient.a using ar command

ar rcs mysqlclient.a mysqlclient.lib

now am keep getting that error Archive has no index; run ranlib to add one

I run ranlib on mysqlclient.a but still getting the above no index error :( do not know how to fix this , so need help

ranlib libmysqlclient.a

am using dev c++ for my project

Upvotes: 0

Views: 6276

Answers (1)

vonbrand
vonbrand

Reputation: 11791

An Unix libxyz.a is an ar(1) archive of object (.o) files with an index created by ranlib(1) (AFAIU, GNU's ar(1) creates the index without requiring the extra step). You are creating a "library" out of a single *.lib file, so ar(1) won't create an index (no .o file in sight).

Where does the .lib comes from? What environment is this?

Upvotes: 1

Related Questions