Topic
  • 3 replies
  • Latest Post - ‏2014-04-09T21:24:53Z by wfronti
F32M_Mike_Segapeli
F32M_Mike_Segapeli
1 Post

Pinned topic Rational AppScan source command line issue

‏2012-07-12T22:37:11Z |
Hi,
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);
Updated on 2013-02-15T15:40:33Z at 2013-02-15T15:40:33Z by SystemAdmin
  • SystemAdmin
    SystemAdmin
    49 Posts

    Re: Rational AppScan source command line issue

    ‏2013-02-15T15:40:33Z  
    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:
    http://www.edg.com/docs/edg_cpp.pdf

    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
    eedeen
    1 Post

    Re: Rational AppScan source command line issue

    ‏2014-02-20T19:28:24Z  
    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:
    http://www.edg.com/docs/edg_cpp.pdf

    If you need further assistance with what additional options you need to set, please open up a new PMR with the IBM Support team.

    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?

    Thanks,

    -Eric

     

  • wfronti
    wfronti
    8 Posts

    Re: Rational AppScan source command line issue

    ‏2014-04-09T21:24:53Z  
    • eedeen
    • ‏2014-02-20T19:28:24Z

    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?

    Thanks,

    -Eric

     

    Hi Eric,

    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.