Visual Studio 2019 编译 masscan-1.3.2

Visual Studio 2019 编译 masscan-1.3.2

1、下载 masscan

https://github.com/robertdavidgraham/masscan

2、编译

用 Vistual Studio 2019 加载工程文件 masscan-1.3.2\vs10\masscan.sln,提示升级构建环境(因作者是用vs10构建的工程),直接点升级。

正在升级项目“masscan”...
	配置“Debug|Win32”: 将平台工具集更改为“v142”(之前为“v100”)。 
	配置“Debug|x64”: 将平台工具集更改为“v142”(之前为“v100”)。 
	配置“Release|Win32”: 将平台工具集更改为“v142”(之前为“v100”)。 
	配置“Release|x64”: 将平台工具集更改为“v142”(之前为“v100”)。
重定目标结束: 1 个已完成,0 个未通过,0 个已跳过

然后直接编译,报错:
在这里插入图片描述
编译出错的位置在 string_s.h 文件,原因是预设的编译环境没有命中到

 #if defined(_MSC_VER) && (_MSC_VER == 1900)
 修改成
 #if defined(_MSC_VER) && (_MSC_VER == 1920)

再重新编译,成功。

3、总结

string_s.h 文件最上面的注释,已讲明了为什么。

/*
    safe "string" functions, like Microsoft's

    This is for the "safe" clib functions, where things like "strcpy()" is
    replaced with a safer version of the function, like "strcpy_s()". Since
    these things are non-standard, compilers deal with them differently.

 Reference:
 http://msdn.microsoft.com/en-us/library/bb288454.aspx
*/
  • 0
    点赞
  • 0
    收藏
    觉得还不错? 一键收藏
  • 0
    评论

“相关推荐”对你有帮助么?

  • 非常没帮助
  • 没帮助
  • 一般
  • 有帮助
  • 非常有帮助
提交
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值