本文介绍了在使用FreeRTOSv9.0.0的WIN32-MSVC工程时,通过Visual Studio 2012编译遇到的错误及其解决方案。错误源于Platform Toolset配置不正确,通过将"Platform Toolset"参数改为"Visual Studio 2012(v110)",可以成功编译项目。此外,文章还提到有些工程可能会提示更新VC++编译器和库,更新后同样能匹配当前VS版本。
问题描述 最近抽空研究下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, andthenselect"Update VC++ Projects...". Install v140 to build using the v140 build tools.
========== Build: 0 succeeded, 1 failed, 0 up-to-date, 0 skipped ==========