HI how can i create .lib files and .dll files in VC++ (cl.exe) from command line Thanks in advance
+3
A:
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
.
E.g.
LIB.EXE /OUT:MYLIB.LIB FILE1.OBJ FILE2.OBJ
To create a dll, you just use LINK.EXE
(as for executables) but with the /DLL
switch.
E.g.
LINK.EXE /DLL /OUT:MYLIB.DLL FILE3.OBJ FILE4.OBJ
Charles Bailey
2010-04-28 06:38:22
Thanks a lot can you please also help me how i can create a dll file from the command line....
Vineel Kumar Reddy
2010-04-28 06:53:03
@Vineel Kumar Reddy: Updated.
Charles Bailey
2010-04-28 07:11:29
+1
A:
Re making a DLL, there are shorthand form(s) if you have the source files:
cl /LD foo.c bar.c baz.c /FeMyImage.dll
or
cl /LD foo.c bar.c baz.c /link /out:MyImage.dll
are equivalent.
Alex
2010-04-28 07:16:59