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

Discussion in 'C++' started by Sim Nanda, Feb 18, 2004.

  1. Sim Nanda

    Sim Nanda Guest

    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
    Sim Nanda, Feb 18, 2004
    #1
    1. Advertising

  2. "Sim Nanda" <> wrote in message
    news:...
    > 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
    Jonathan Turkanis, Feb 18, 2004
    #2
    1. Advertising

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

It takes just 2 minutes to sign up (and it's free!). Just click the sign up button to choose a username and then you can ask your own questions on the forum.
Similar Threads
  1. michael

    ASP.NET command line compiler?

    michael, Feb 24, 2004, in forum: ASP .Net
    Replies:
    2
    Views:
    622
    =?Utf-8?B?Sm9obiBTY3JhZ2c=?=
    Feb 24, 2004
  2. Jon Maz
    Replies:
    2
    Views:
    468
    Jon Maz
    Sep 30, 2004
  3. Joseph Farmer

    How to invoke the ASP.NET compiler

    Joseph Farmer, Jun 1, 2005, in forum: ASP .Net
    Replies:
    3
    Views:
    3,941
    Juan T. Llibre
    Jun 1, 2005
  4. =?Utf-8?B?Q2hhcmxpZSBK?=

    Command Line Compiler

    =?Utf-8?B?Q2hhcmxpZSBK?=, Apr 3, 2006, in forum: ASP .Net
    Replies:
    1
    Views:
    588
    Flinky Wisty Pomm
    Apr 3, 2006
  5. smith jack
    Replies:
    2
    Views:
    282
    Steven D'Aprano
    Aug 23, 2011
Loading...

Share This Page