【问题标题】:frama-c usage on windows 7windows 7上的frama-c用法
【发布时间】:2014-03-12 21:18:11
【问题描述】:

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

当我尝试运行 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. -
x c' 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.

任何线索/建议?

【问题讨论】:

    标签: windows gcc cygwin frama-c


    【解决方案1】:

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

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


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

    【讨论】:

      猜你喜欢
      • 2023-04-04
      • 1970-01-01
      • 2014-03-19
      • 1970-01-01
      • 1970-01-01
      • 1970-01-01
      • 1970-01-01
      • 1970-01-01
      • 2012-01-23
      相关资源
      最近更新 更多