c++用visual studio 从dll 文件 生成 lib文件

来源:互联网 发布:飞利浦电动牙刷知乎 编辑:程序博客网 时间:2024/05/08 04:30


一、打开工具 Visual Studio Tools command promopt (Start -> All Programs-> Microsoft Visual Studio 2010 -> Visual Studio Tools -> Visual Studio Command Prompt).

二、生成 .def文件,如果Dll文件已经存在对应的.def文件,这一步可以省略。使用dumpbin命令生成对应的.def文件:dumpbin /exports libvlc.dll

创建一个.def文件(我的是 libvlc.def), 编辑该文件,将上述红框内的函数名复制到该文件中,在首行中添加EXPORTS

三、生成.lib。使用 visual studio command prompt命令窗口,执行如下命令:

lib /def:libvlc.def /out:libvlc.lib /machine:x86


0 0