How to use .a lib files with Visual Studio 2008?

2019-02-24 00:38发布

So I have some C/C++ library compiled into .a files. library is ffmpeg (52). Could any one provide me with detailed instructions on how to use it in visual studio 2008 (how to link it to VS so that compiler would find it and so on)?

2条回答
啃猪蹄的小仙女
3楼-- · 2019-02-24 01:11

Please rename your file from .a to .lib, and place it along with the source files of the project.

Now go to project's properties and in the VS C++ include directories add the path of the header/include files for that lib.

To use the symbols in a source file write

#pragma comment(lib, "your library's name")
查看更多
登录 后发表回答