I want to use Notepad and invoke the compiler and linker from the command prompt.
No IDE no make , nmake or anything like similar because I want to know the exact syntax required to do the following:
1. create a static library
2. create a dll
Yes, I have browsed the MSDN site but the examples I saw assume one is using the IDE which does a lot of setup behind the scenes
Pls Note: I know how to compile executables using cl also setting up the env using vcvarsall.bat. My question is about compiling static libraries and dlls.
I am using Microsoft (R) 32-bit C/C++ Optimizing Compiler Version 15.00.30729.01 for 80×86.
Suggestions on to use some other compiler ( gcc, mingw, intel etc.) will not be helpful at the moment.
For DLLs, pass the
/cflag tocl.exe(which compiles but doesn’t link), and pass the/DLLflag tolink.exe. Instead of making an executable, it makes a DLL.For static libraries, use the
lib.exeprogram.