繁体   English   中英

在Windows 7上使用frama-c

[英]frama-c usage on windows 7

我已经从frame-c网站http://frama-c.com/download.html安装了Windows安装程序的Boron版本。

当我尝试运行val插件时,收到关于未设置预处理器可变CPP的错误,如下所示:

 C:\\Frama-C\\bin>frama-c.exe -val filename.cpp [kernel] user error: failed to run: gcc -C -E -I. -o "C:\\Users\\akandoor\\AppData\\Local\\Temp\\filename.cpp4f5d23.i" "filename.cpp" you may set the CPP environment variable to select the proper preprocessor command or use the option "-cpp-command". [kernel] user error: skipping file "filename.cpp" that has errors. [kernel] Frama-C aborted because of an invalid user input. 

使用-cpp-command我得到以下错误:

 C:\\Frama-C\\bin>frama-c.exe -cpp-command 'C:\\utils\\cygwin\\bin\\gcc.exe -C -E -I. - xc' filename.cpp [kernel] user error: option `-C' is unknown. use `frama-c.exe -help' for more information. [kernel] Frama-C aborted because of an invalid user input. 

有任何线索/建议吗?

这是一个建议:由于预处理会引起麻烦,因此请以对您方便的任何方式进行预处理,并将预处理后的文件另存为.i文件。 然后在Frama-C命令行上传递.i文件:它将知道它不需要进行预处理。

如果您在.c文件中插入批注或要更改预处理选项,请不要忘记重新生成.i文件。


对于想要最后一个改进的Frama-C版本的用户来说,另一个更常见的建议是在Linux虚拟机中安装。 这将使一切正常工作。 默认PATH中会有一个GCC,并且该GCC将使用命令行选项-C-E进行预处理。 您将使用与Frama-C的大多数用户和开发人员相同的环境。 您也可以使用更新的版本。

暂无
暂无

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM