Convert .a file into .lib file for C/C++ project

  .a, c++, dll, lib

I have got a question. In my quest to add external packages to my C/C++ project, i read differents topics about how to convert static library (.a) into static library (.lib). I downloaded packages and i wanted to add them manually using their pathway.

I added my packages as followed:

1 / Add the path of the headers in the compiler directories for the project:

-> Project / Properties menu

-> On the left tree, choose Configuration properties – C / C ++ – General

-> On the right table, the first line "Other Include directories": add the directory (s) of your library containing the headers

2 / Add the path of the .lib in the compiler directories for the project:

-> Project / Properties menu

-> On the left tree, choose Configuration Properties – Link Editor – General

-> On the right table, the line "Directory of additional libraries": add the directory (s) of your library containing the .libs

3 / Specify the libraries with which your project is linked:

-> Project / Properties menu

-> On the left tree, choose Configuration Properties – Link Editor – Enter

-> On the right table, the first line "Additional dependencies": add the .lib library (s) with which your project must be linked

But I looked for .lib files to add to my linker input instead, I found .a files and .dll files and I didn’t know what to do. . a files and .lib files are almost identical. It seems like .a files are used under linux while .lib are used under windows. I tried to add the .a files unsuccesfilly. I wondered if I could convert an .a file into a .lib file.
Can i convert a static library (.a) into a static library (.lib).

Thanks

Source: Windows Questions C++

LEAVE A COMMENT