最近在win10系统上编译阿里的MNN库,工程的编译配置为Cmake+Ninja+VS2017,在powershell里面输入"./schema/generate.ps1"时输出 cl.exe is not able to compile a simple test program,且看到最后几行输出这样的日志:
RC Pass 1:command "rc /fo CMakeFiles\cmTC_0d010.dir/manifest.res CMakeFiles\cmTC_0d010.dir/manifest.rc" failed (exit code 0) with the following output:
系统找不到指定的文件。
ninja: build stopped:subcommand failed.
很明显,系统提示找不到rc的命名,因此需要将rc.exe所在路径添加到Path环境变量(这里可以用everything工具搜索rc.exe的路径)。
但是如上操作之后,我还出现了 无法打开文件"kernel32.lib" 的错误,很明显这是vs2017没有配置好的原因,这里Windwos10下使用Cmake构建Ninja环境变量问题 - 知乎
解决了我的问题。