创建.dll和.lib文件与VC ++命令行 [英] Creating .dll and .lib files with the VC++ command line

查看:129
本文介绍了创建.dll和.lib文件与VC ++命令行的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我如何创建的.lib 文件和的.dll 在VC ++文件, CL .EXE 命令行?

How can I create .lib files and .dll files in VC++ with cl.exe from the command line?

推荐答案

Visual Studio中附带一个名为库的工具 LIB.EXE 可用于从创建库文件目标文件。如果设置了命令行,让你有 CL.EXE 的道路上,你也应该能够运行 LIB.EXE

Visual Studio comes with a library tool called LIB.EXE which can be used to create library files from object files. If you set up the command line so that you have CL.EXE on the path, you should also be able to run LIB.EXE.

例如

LIB.EXE /OUT:MYLIB.LIB FILE1.OBJ FILE2.OBJ

要创建一个DLL,您只需要使用 LINK.EXE (为可执行文件),但与 / DLL 开关。

To create a dll, you just use LINK.EXE (as for executables) but with the /DLL switch.

例如

LINK.EXE /DLL /OUT:MYLIB.DLL FILE3.OBJ FILE4.OBJ

这篇关于创建.dll和.lib文件与VC ++命令行的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆