Re: visual C++



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


.



Relevant Pages

  • Re: IDE and setting classpath for command line
    ... Also, list all your directories and files that you are trying to compile, so we can make certain that you're typing in the correct paths. ... IDE and command prompt? ... I can't get java c command to compile, ...
    (comp.lang.java.help)
  • Re: Problem in calling c programs and compiling them in tcl/tk
    ... Are you using Tcl's glob command to do this? ... using exec gcc filename.c and later exec ./a.out filename.c. ... the execution of a command that might generate a Tcl error. ... i can call a c program and compile it? ...
    (comp.lang.tcl)
  • RE: Console Application Testing
    ... vbc.exe could be accessed in Visual Studio Command ... If you want to compile the project in command prompt with vbc.exe, ... Microsoft Online Community Support ...
    (microsoft.public.dotnet.languages.vb)
  • Re: Macro prompt
    ... I'm sorry, Pcman, I don't think I can help here. ... If you want to test the action of clicking a command button on a form, I suggest you test it by clicking the command button on the form, not by trying to run the Click event code from within the VBE window. ... Steve Schapel, Microsoft Access MVP ... options pop-up menu the the "Compile" section has already checked off Compile ...
    (microsoft.public.access.macros)
  • Re: Novice cant compile and run
    ... > The reason for my post here is, ... > tried to compile Mr. Dippold's code. ... > WPCRACK.exe" runs in a console window, but to work correctly, I need to ... > add some command line parameters. ...
    (comp.lang.cpp)