Parasoft C/C++ Test error: expected an identifier extern "C" {

235 views Asked by At

When I tried to run unit test for a simple main program in C++:

#include <iostream>

int main()
{
  std::cout << "hello world" << std::endl;

  return 0;
}

it occurred the following problem:

C++test analysis errors in /Demo_aCpp
    1. Test execution: error preparing instrumentation / symbols data for file.
"/usr/include/sys/features.h", line 25: error: expected an identifier
  extern "C" {
         ^

"/usr/include/sys/features.h", line 25: error: expected a ";"
  extern "C" {
             ^

"/usr/include/sys/reent.h", line 9: error: expected an identifier
  extern "C" {
         ^

"/usr/include/sys/reent.h", line 9: error: expected a ";"
  extern "C" {
             ^
...
Error limit reached.
100 errors detected in the compilation of "C:\Users\username\AppData\Local\Temp\ParaSoft.1840.28297.c".
Compilation terminated.

I have no idea about this. Any hint on this? Thanks in advance

0

There are 0 answers