FreeRTOSv9.0.0版本WIN32-MSVC工程使用VisualStudio2012编译报错解决

本文介绍了在使用FreeRTOSv9.0.0的WIN32-MSVC工程时,通过Visual Studio 2012编译遇到的错误及其解决方案。错误源于Platform Toolset配置不正确,通过将"Platform Toolset"参数改为"Visual Studio 2012(v110)",可以成功编译项目。此外,文章还提到有些工程可能会提示更新VC++编译器和库,更新后同样能匹配当前VS版本。

摘要生成于 C知道 ,由 DeepSeek-R1 满血版支持, 前往体验 >

FreeRTOSv9.0.0版本WIN32-MSVC工程使用VisualStudio2012编译报错解决

  • 前言=废话
    对于喜欢FreeRTOS的人来讲,纯碎研究kernel的task机制,如果可以不依赖于硬件,无论从调试手段,还是调试速度,纯软件调试非常方便。FreeRTOSv9.0.0源码基于强大的VisualStudio工具提供了MSVC项目,可以在PC端直接模拟调试。
  • 问题描述
    最近抽空研究下FreeRTOS,安装好Visual Studio 2012,打开工程文件FreeRTOSv9.0.0\FreeRTOS\Demo\WIN32-MSVC\WIN32.vcxproj,编译,居然有错,如下:
  • VC下详细错误
1>------ Build started: Project: RTOSDemo, Configuration: Debug Win32 ------
1>Project file contains ToolsVersion="14.0". This toolset may be unknown or missing, in which case you may be able to resolve this by installing the appropriate version of MSBuild, or the build may have been forced to a particular ToolsVersion for policy reasons. Treating the project as if it had ToolsVersion="4.0". For more information, please see http://go.microsoft.com/fwlink/?LinkId=291333.
1>C:\Program Files (x86)\MSBuild\Microsoft.Cpp\v4.0\V110\Microsoft.Cpp.Platform.targets(44,5): error MSB8020: The builds tools for v140 (Platform Toolset = 'v140') cannot be found. To build using the v140 build tools, either click the Project menu or right-click the solution, and then select "Update VC++ Projects...". Install v140 to build using the v140 build tools.
========== Build: 0 succeeded, 1 failed, 0 up-to-date, 0 skipped ==========
  • 解决方案
    以为自己的VC2012有问题,自己新建个工程编译,success。网上搜索相关错误也没有找到解决方案,最后硬着头皮看完错误信息,大体意思就是没有找到当前solution (project)相对应的的工具版本,当前工具版本不符,根据理解和第一反应,修改配置信息,解决问题。方法如下:
    1 - 右击 “RTOSDemo”, 选择 “Properties”;
    这里写图片描述
    2- 查看”Configuration Properties” -> “General”,发现”Platform Toolset” 参数是 “v140“,这个v140在编译错误里面出现过(错误信息:The builds tools for v140 (Platform Toolset = ‘v140’) cannot be found.),发现问题点。
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

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

抵扣说明:

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

余额充值