用cl啊,就可以啊 cl/ld 后面跟上其他的选项和文件名就可以了cl的格式是CL [option...] file... [option | file]... [lib...] [@command-file] [/link link-opt...]The following table describes input to the CL command.Entry Meaning option One or more CL options. Note that all options apply to all specified source files. Options are specified by either a forward slash (/) or a dash (–). If an option takes an argument, the option’s description documents whether a space is allowed between the option and the arguments. Option names (except for the /HELP option) are case sensitive. See Order of CL Options for more information. file The name of one or more source files, .OBJ files, or libraries. CL compiles source files and passes the names of the .OBJ files and libraries to the linker. See CL Filename Syntax for more information. lib One or more library names. CL passes these names to the linker. command-file A file that contains multiple options and filenames. See CL Command Files for more information. link-opt One or more linker options. CL passes these options to the linker.
msdev project.dsp /MAKE "project - Win32 Release" /REBUILD
你可以试着分析一下工程设置里的参数.
以前在命令行编译程序的时代,建一个make.bat是个解决办法.
我新建一个空的工程用你给的命令,报错,错误如下:
C:\Program Files\Microsoft Visual Studio\Common\MSDev98\Bin>msdev .\2\1\1.dsp /M
AKE "1 - Win32 Debug" /REBUILD
Deleting intermediate files and output files for project '1 - Win32 Debug'.
--------------------Configuration: 1 - Win32 Debug--------------------
Compiling resources...
Compiling...
StdAfx.cpp
c:\program files\microsoft visual studio\vc98\include\winnls.h(514) : error C201
8: unknown character '0x10'
c:\program files\microsoft visual studio\vc98\include\objidl.h(9586) : error C20
18: unknown character '0xed'
c:\program files\microsoft visual studio\vc98\include\objidl.h(9586) : error C20
61: syntax error : identifier 'IEnu'
Error executing cl.exe.
option One or more CL options. Note that all options apply to all specified source files. Options are specified by either a forward slash (/) or a dash (–). If an option takes an argument, the option’s description documents whether a space is allowed between the option and the arguments. Option names (except for the /HELP option) are case sensitive.
See Order of CL Options for more information.
file The name of one or more source files, .OBJ files, or libraries. CL compiles source files and passes the names of the .OBJ files and libraries to the linker. See CL Filename Syntax for more information.
lib One or more library names. CL passes these names to the linker.
command-file A file that contains multiple options and filenames. See CL Command Files for more information.
link-opt One or more linker options. CL passes these options to the linker.