为了用newlisp来实现VC编译,以便用我的Emacs开发VC程序,而不需要再打开VS 2012, 需要自己实现命令行的编译。我不需要nmake,因为我想直接了解VC编译器,以便今后更好的驾驭它。
首先要获得VC编译的cl命令行,方法是右键点击工程,点击Properties菜单,在打开的对话框中,选择C/C++ General菜单,然后将Supress Startup Banner改为No。
重新编译吧,看到最原始的cl命令了。
1> Copyright (C) Microsoft Corporation. All rights reserved. 1> 1> cl /c /IC:Usersshu6889.CHNworkgitlab untime asterlibsusainclude /ZI /nologo- /W3 /WX- /sdl /Od /Oy- /D WIN32 /D _DEBUG /D _CONSOLE /D _UNICODE /D UNICODE /Gm /EHsc /RTC1 /MDd /GS /fp:precise /Zc:wchar_t /Zc:forScope /Yc"stdafx.h" /Fp"DebugHelloWorld.pch" /Fo"Debug\" /Fd"Debugvc110.pdb" /Gd /TP /analyze- /errorReport:prompt stdafx.cpp 1>cl : Command line warning D9035: option 'nologo-' has been deprecated and will be removed in a future release 1> 1> stdafx.cpp 1> Microsoft (R) C/C++ Optimizing Compiler Version 17.00.50727.1 for x86 1> Copyright (C) Microsoft Corporation. All rights reserved. 1> 1> cl /c /IC:Usersshu6889.CHNworkgitlab untime asterlibsusainclude /ZI /nologo- /W3 /WX- /sdl /Od /Oy- /D WIN32 /D _DEBUG /D _CONSOLE /D _UNICODE /D UNICODE /Gm /EHsc /RTC1 /MDd /GS /fp:precise /Zc:wchar_t /Zc:forScope /Yu"stdafx.h" /Fp"DebugHelloWorld.pch" /Fo"Debug\" /Fd"Debugvc110.pdb" /Gd /TP /analyze- /errorReport:prompt HelloWorld.cpp 1>cl : Command line warning D9035: option 'nologo-' has been deprecated and will be removed in a future release 1> 1> HelloWorld.cpp 1>Link: 1> Creating library C:Usersshu6889.CHNworkgitlab untime astercodesstudyGDALStudyDebugHelloWorld.lib and object C:Usersshu6889.CHNworkgitlab untime astercodesstudyGDALStudyDebugHelloWorld.exp 1> GDALStudy.vcxproj -> C:Usersshu6889.CHNworkgitlab untime astercodesstudyGDALStudyDebugHelloWorld.exe 1>FinalizeBuildStatus: 1> Deleting file "DebugHelloWorld.unsuccessfulbuild". 1> Touching "DebugHelloWorld.lastbuildstate". 1> 1>Build succeeded.