Androider
Androider

Reputation: 21345

C++ static library - how to create .a file from .lib?

I downloaded an opensource C++ library. The problem is that it's a library object file (.lib). This is how it is distributed. On the other hand I am trying to use it as a static library using Android NDK and this expects a .a file. Its been years since I've used C++ so perhaps someone could clarify this. Not really sure why they distribute as .lib vs. .a file? And how can I create .a file from the .lib one?

Upvotes: 4

Views: 2424

Answers (1)

sehe
sehe

Reputation: 393537

Look at the ar command from binutils:

ar rcs mylib.a mylib.lib

Upvotes: 7

Related Questions