开发者

Selecting a compiler for a make file

Say you have both VS2008 and VS 6 installed on your computer, and you wish to write an make file that will compile some C++ code using the VS 6.0 compiler. How can you do that? What is the way to control the开发者_如何学编程 selection of the compiler outside the make file?

Thanks


I am not sure that VS 6.0 had VCVARS32.BAT but if there is VCVARS32.BAT then you need to set your environment using VCVARS32.BAT. See Building from the Command Line, "Running VCVARS32.BAT".

If you need VS 2008 than you run VCVARS32.BAT from VS 2008.
If you need VS 6.0 than you run VCVARS32.BAT from VS 6.0.

Again, I am not sure that VS 6.0 had VCVARS32.BAT so check it.

For example building Hello, World program might look like:

"D:\Program Files\Microsoft Visual Studio 8\Common7\Tools\vsvars32.bat" && cl hello_world.cpp
0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜