Using Visual Studio's 'cl' from a normal command line

后端 未结 7 1409
生来不讨喜
生来不讨喜 2020-11-28 21:28

Visual Studio 2003 and 2005 (and perhaps 2008 for all I know) require the command line user to run in the \'Visual Studio Command Prompt\'. When starting this command promp

7条回答
  •  猫巷女王i
    2020-11-28 21:47

    What the vcvars32 or vsvars32 batch files do is not rocket science. They simply set the PATH, INCLUDE, LIB, and possibly the LIBPATH environment variables to sensible defaults for the particular compiler version.

    All you have to do is make sure that those things are set properly for your Ant or makefile (either before invoking them or within them).

    For INCLUDE and LIB/LIBPATH an alternative to setting those items in environment variables is to pass those settings to to command line as explicit parameters.

提交回复
热议问题