简体   繁体   中英

frama-c usage on windows 7

I have installed Boron version of windows installer from frame-c website http://frama-c.com/download.html

when I try to run the val plugin, I am getting an error about preprocessor varaible CPP not being set as below:

 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. 

with the -cpp-command I get the following error:

 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. 

ANy clues/suggestions?

Here is a suggestion: since pre-processing is causing trouble, do the pre-processing in any way that is convenient for you, saving the pre-processed file(s) as .i files. Then pass the .i files on Frama-C commandline: it will know it does not need to pre-process them then.

If you insert annotations into the .c files or want to change the pre-processing options, do not forget to re-generate the .i files.


Another suggestion more often addressed to people who want the last, improved Frama-C version is to install inside a Linux virtual machine. This would make everything just work. There would be a GCC in the default PATH, and this GCC would take the commandline options -C and -E to pre-process. You would be using the same environment as most of the users and developers of Frama-C. And you could have a more recent version, too.

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

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