I’m trying to port a api from windows to linux. So far I’ve done the work on file.cpp and file.h but I still have a library .lib specified to windows that is needed in order for the api to work. how can I build a file.a usable on linux from this library?
Share
Static libraries in Linux (or all POSIX systems, like Mac OSX) are actually archives containing all object files. These archives are created with the
arcommand:The above command creates the “archive” (i.e. static library)
some_library.afrom the object filesome_object_file.o. This library can now be used when linking other programs.