Pinned topic Rational AppScan source command line issue
I am trying to scan C source using the command line interface. My scans immediately report "syntax" errors in stdio.h. Does anyone know how to avoid this? The code compiles fine outside of Appscan.
Skipping file sscmprs.c due to error: "C:\Program Files\Microsoft Visual Studio 10.0\VC\include\stdio.h", line 299: error:
expected a ")"
_CRT_NONSTDC_DEPRECATE(_unlink) _CRTIMP int __cdecl unlink(_In_z_ const char * _Filename);
SystemAdmin 110000D4XK49 Posts
Re: Rational AppScan source command line issue2013-02-15T15:40:33ZThis is the accepted answer. This is the accepted answer.Hi Mike,
When scanning C/C++ code using AppScan Source, a front end C/C++ compiler called EDG is used which emulates different compilers such as Microsoft Visual Studio, GNU C/C++, and Sun Studio. Depending on the source code, there are usually certain EDG compiler options or preprocessor definitions that we may have to specify in order to get the application to compile and scan correctly within AppScan Source.
You can reference the online EDG Manual here:
If you need further assistance with what additional options you need to set, please open up a new PMR with the IBM Support team.
eedeen 270000A28R1 Post
Re: Rational AppScan source command line issue2014-02-20T19:28:24ZThis is the accepted answer. This is the accepted answer.
- SystemAdmin 110000D4XK
Hello, I am also dealing with a compiler error in AppScan that I can't seem to solve. The project in question has been imported from a Visual Studio project and compiles correctly when built from the IDE, but not from AppScan. Errors are occurring in system header files so I am assuming that I AppScan is not generating the correct compiler switches and preprocessor definitions when it creates the project.
The .pdf document at the link you supplied is for version 4.8. Is that the same version that is embedded in AppScan Source 8.7.1? Also, the document implies that the EDG compiler front end runs in different modes, e.g. "Windows Mode". Can I assume that this mode is invoked by AppScan when it imports an application from a Visual Studio solution file? What other EDG settings are passed in and can they be overridden? In another forum someone mentioned a --edg option that can be specified in the compiler options text box on the project dependencies tab, however I cannot find any documentation on this. Can you provide me more information on how to use this?
wfronti 060000XG2M8 Posts
Re: Rational AppScan source command line issue2014-04-09T21:24:53ZThis is the accepted answer. This is the accepted answer.
- eedeen 270000A28R
I would like to first offer up a logging option so you may see the actual Switches currently used by AppScan. Within the Eclipse UI (Source for Analysis), under Edit -> Preferences -> General -> Logging Level -> Set to "Informational". This will dump the edg flags used in the Scanner Exception log found in c:\programData\IBM\AppScanSource\Logs\scanner_exceptions.log.
Also, there are known issues with compiling 64 bit Applications since edg is preconfigured to compile for 32 bit applications. It's possible 64 bit switches might resolve your problem.
When creating the Project in AppScan, did you import the project from Visual studio? If so, the Project options will be read only. You must copy the Projects (clone them) to make the options modifiable for alternate edg flags.
If you have any specific errors in compilation from the Exception Log, please supply them and I will have a look.