Re: How to compile simple command prompt apps in VC++ .NET like in VC+

From: Victor Bazarov (v.Abazarov_at_comAcast.net)
Date: 02/17/05


Date: Thu, 17 Feb 2005 11:43:09 -0500

Joachim wrote:
> I have the following simple program:
> [...]
>
> How can I compile it with Visual Studio C++ .NET 2003? In Visual Studio C++
> 6 it was possible, but how do I do it (if possible) in .NET 2003? Just
> opening this file will not let me compile it in .NET 2003.... Help!

You will have to create a [console app] project for it.

If all you need is to test if some code compiles, it's worth your time to
create a simple "test" project and always have it handy. Need to test
some code? Open the "test" project, paste the code into the single source
file, compile, build, debug... That's what I have for all NG stuff.

If you are only concerned with creating a working program from some text
once and not to worry about it any longer, and you don't need to debug it
or anything fancy, then you could simply use the command-line compiler,
CL. Open the "Visual Studio .NET Tools | V S .NET 2003 Command Prompt",
change to the required directory and do

    CL -c yourfile.cpp

(or without -c to also link it).

V



Relevant Pages

  • Re: release build failed!!!
    ... I did a quick & dirty console project with your enum. ... It compiles fine with ... VC2005 using default debug and release settings. ... All errors are pointing to a single statement, ...
    (microsoft.public.vc.mfc)
  • Re: iostream
    ... Thanks Scott! ... It compiles now. ... Maxim Shatskih, Windows DDK MVP ... console app that tests out my driver. ...
    (microsoft.public.development.device.drivers)
  • Re: Debug mode wont build. Release does.
    ... The settings are Multi-Threaded Debug and Multi-Threaded for Debug and Release respectively. ... It compiles and links in Debug and Release. ...
    (microsoft.public.vc.ide_general)
  • Re: .net cf sp2 problem
    ... Usually when you tell VS to debug it compiles ... > system is Traditional Chinese. ... > White Rong ...
    (microsoft.public.dotnet.framework.compactframework)
  • Re: How can I develop in C with VS2005 for Pocket PC??
    ... Ok, I just have substitute in my C code the main function for WinMain, ... Now it compiles with 0 ... when I want to run it or debug it (at the moment I have only some ... yet nothing of Pocket PC) it appears like a pocket pc ...
    (microsoft.public.pocketpc.developer)