Re: visual C++
- From: "Carl Daniel [VC++ MVP]" <cpdaniel_remove_this_and_nospam@xxxxxxxxxxxxxxx>
- Date: Thu, 23 Aug 2007 20:24:11 -0700
moongeegee wrote:
I am new in Visual C++. I have installed VC++ and like to use console
window to compile C++ program.
Which command should I use.
In Unix I use: g++ test.C -o test, what is the VC++ command for
compiling on console window.
For starters -
- Use the "Visual Studio 2005 Command Prompt" shortcut that was installed in
your Start menu to get a command prompt that's properly configured
(environment variables, in particular) to run the VC++ command line tools.
- To compile a simple C++ program into an EXE you would use:
cl test.cpp
This will compile and link the program, producing test.exe.
If your file contains C and not C++, name the file with a .c extension
(similarly, if it contains C++, name it .cpp - windows file names are not
case sensitive, so the *nix convention of .c for C files and .C for C++
files won't work).
-cd
.
- References:
- visual C++
- From: moongeegee
- visual C++
- Prev by Date: Re: visual C++
- Next by Date: Re: VS2005 Locals - Variable turns red
- Previous by thread: Re: visual C++
- Next by thread: VS2005 Locals - Variable turns red
- Index(es):
Relevant Pages
|