Archived

This topic is now archived and is closed to further replies.

Lucidquiet

Using MSVC++ Compiler From the Command Line

Recommended Posts

Is it possible to use MSVC++ Compiler from the command line -- and how? That is my question. I''m not even sure where to start with this, but I hope it can be done. I realize that getting any of the project management out of MSVC++ is probably hopeless from the command line but is there a way to at least get the Compiler Out of the IDE -- so to speak? thanks, L- " ''No one has control -- control is just a fantasy. And being human is difficult.'' "

Share this post


Link to post
Share on other sites
There should be a vcvars32.bat file in a \bin subdirectory of your MSVC installation. Run that from the command line and it should set up the environment variables necessary to use MSVC from the command line. The C++ compiler is cl.exe, the linker is link.exe and the make program is nmake.exe.

Share this post


Link to post
Share on other sites
Thanks, that seems to work just great.

I was looking at the size of the cl.exe, and link.exe as executables, and they are amazingly tiny, any body have any ideas on that -- I mean I suppose everything it needs is dynamically linked.

Thanks,
L-

Share this post


Link to post
Share on other sites
LucidQuiet: you will find that you can create remarkably tiny individual binaries by modifying options, but bear in mind that these are loading and calling DLLs which is a little less efficient than executing staticly linked files.

To see which dependancies are needed for a program use Dependancy Walker (depends.exe) which is part of either the Platform SDK, or Microsoft .NET SDK, and IIRC is installed with Visual Studio Professional.

Share this post


Link to post
Share on other sites
Thanks everyone... I appreciate all of your answers/post -- pretty amazing really, I didn''t know this stuff... not the foggiest. Thanks for the link to Dependency Walker -- nice.

Thanks, again,
L-

" ''No one has control -- control is just a fantasy. And being human is difficult.'' "

Share this post


Link to post
Share on other sites