2014-03-12 31 views
1

我已經安裝了Windows安裝程序的硼版本從框架-C網站http://frama-c.com/download.html郵資-C使用7

,當我嘗試運行VAL插件,我得到有關預處理程序錯誤varaible 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命令我碰到下面的錯誤:

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. 

任何線索/建議嗎?

回答

1

這是一個建議:由於預處理導致麻煩,請以任何方便的方式進行預處理,將預處理文件保存爲.i文件。然後通過Frama-C命令行傳遞.i文件:它會知道它不需要預先處理它們。

如果將註釋插入到.c文件或想要更改預處理選項,請不要忘記重新生成.i文件。


對於那些想要最後一個改進的Frama-C版本的人來說,另一個建議是安裝在Linux虛擬機中。這將使一切正常工作。默認路徑中會有GCC,並且此GCC將採用命令行選項-C-E進行預處理。您將使用與Frama-C的大多數用戶和開發人員相同的環境。你也可以有更新的版本。