在Win7上用Visual Studio编译putty源代码。
- 安装vs2005,只安装c++和.net framework sdk即可;
-
将putty-src.zip解压到e:\MyDoc\VSProjects\Putty下;
-
用vs2005打开e:\MyDoc\VSProjects\Putty\WINDOWS\MSVC\PUTTY.DSW;
-
打开C:\Program Files\Microsoft Visual Studio 8\VC\PlatformSDK\Include\Security.h,在第一行加上“#define SECURITY_WIN32”;
-
编译putty项目;
注:如果不做第4步,会报
fatal error C1189: #error : You must define one of SECURITY_WIN32, SECURITY_KERNEL, or Generating Code...
导致编译失败。