How do I invoke the .NET C++ compiler from the command line?

S

Sim Nanda

Hello,
When I used to have MSVStudio 6.0 on my old machine, I
could just use:
cc somefile.cpp -o somefile.exe
to invoke the compiler from the command prompt.
Which I found very helpful for quick little test
programs.

Recently, I've moved to a new machine
at work which came with MS .NET pre-installed. I can't
seem to find a way to invoke the C++ compiler from
the commandline. I've searched the .NET directory for
executables, and Help isn't very helpful.

Does anyone know if there is a command line executable?
It sure is annoying to have to start up the IDE and
create a project for just a single little C++ test file.

bye,
Slarty
 
J

Jonathan Turkanis

Sim Nanda said:
Hello,
When I used to have MSVStudio 6.0 on my old machine, I
could just use:
cc somefile.cpp -o somefile.exe
to invoke the compiler from the command prompt.
Which I found very helpful for quick little test
programs.

This is defintely the wrong group for this microsoft-specific
question. The command-line compiler is called cl.exe. Before using it,
you need to set environment variables, which can be done with
vcvars32.bat in the bin directory.

Jonathan
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Members online

No members online now.

Forum statistics

Threads
473,781
Messages
2,569,615
Members
45,296
Latest member
HeikeHolli

Latest Threads

Top