I have a .a file and a .so file from a c program which I want to use in my ctypes python code. Need some help on which one to use and why
Asked
Active
Viewed 2,505 times
1 Answers
1
(.a) files are Archive libraries, and are statically linked. Thus, if there's any change in the library you need to compile and rebuild your program.
(.so) files are Shared Object files, and are linked during runtime. Thus, if there's a change in the library, you don't need to compile and rebuild your program.
For ctypes, you need to use the .so file. Here is a good reference: Python Standard Library

Brosta
- 173
- 3
- 13