2012年1月19日 星期四

Command-line Compilation


Command-line Compilation

Microsoft Visual C++ 2008 compiler
Before you can perform a command-line compile, you must run vcvars32.bat. This program and the cl.exe for the command-line compile are found in the directory: \Program Files\Microsoft Visual Studio 9.0\VC\bin

C:\deanza\cis27\examples>vcvars32

C:\deanza\cis27\examples>"c:\Program Files\Microsoft Visual Studio 9.0\Common7\Tools\vsvars32.bat"
Setting environment for using Microsoft Visual Studio 2008 x86 tools.

C:\deanza\cis27\examples>cl ex3-11.cpp ex3-11c.cpp ex3-11d.cpp /EHsc
Microsoft (R) 32-bit C/C++ Optimizing Compiler Version 15.00.21022.08 for 80x86
Copyright (C) Microsoft Corporation.  All rights reserved.

ex3-11.cpp
ex3-11c.cpp
ex3-11d.cpp
Generating Code...
Microsoft (R) Incremental Linker Version 9.00.21022.08
Copyright (C) Microsoft Corporation.  All rights reserved.

/out:ex3-11.exe
ex3-11.obj
ex3-11c.obj
ex3-11d.obj

GNU compiler

g++ ex3-11.cpp ex3-11c.cpp ex3-11d.cpp -Wall

Microsoft Visual C++ 2008 與 GNU compiler, Command line compilation

沒有留言:

張貼留言