title: error: variable has incomplete type 'void'
body: <p>I am compiling a c++ code on my Mac machine. I use the terminal to run the setup file using python. When I compile the code to make the .so file, I receive the following errors: </p>
  
  <pre><code>python setup.py build
  running build
  running build_ext
  building 'cec13_func' extension
  gcc -fno-strict-aliasing -fno-common -dynamic -arch x86_64 -DNDEBUG -g -O3 -arch x86_64 -I/Applications/Canopy.app/appdata/canopy-1.5.4.3105.macosx-x86_64/Canopy.app/Contents/include/python2.7 -c cec13_func.cpp -o build/temp.macosx-10.6-x86_64-2.7/cec13_func.o
  cec13_func.cpp:91:6: error: variable has incomplete type 'void'
  void test_func(x, f, nx, mx, func_num);&lt;br&gt;
       ^
  cec13_func.cpp:92:1: error: expected unqualified-id
  {
  ^
  2 errors generated.
  error: command 'gcc' failed with exit status 1
  </code></pre>
  
  <p>and here is the code:</p>
  
  <pre><code>double x[6]={1,2,3,4,5,6};
  double f[2]={0,0};
  int nx = 2;
  int mx = 3;
  int func_num = 1;
  
  void test_func(x, f, nx, mx, func_num)
  {
      int cf_num=10,i;
      if (ini_flag==1)
      {
          if ((n_flag!=nx)||(func_flag!=func_num))
          {
              ini_flag=0;
          }
      }
  
      if (ini_flag==0)
      {
          FILE *fpt;
          char FileName[30];
          free(M);
          free(OShift);
          free(y);
          free(z);
          free(x_bound);
          y=(double *)malloc(sizeof(double)  *  nx);
          z=(double *)malloc(sizeof(double)  *  nx);
          x_bound=(double *)malloc(sizeof(double)  *  nx);
          for (i=0; i&lt;nx; i++)
              x_bound[i]=100.0;
  
          sprintf(FileName, "input_data/M_D%d.txt", nx);
          fpt = fopen(FileName,"r");
          if (fpt==NULL)
          {
              printf("\n Error: Cannot open input file for reading \n");
          }
  
          M=(double*)malloc(cf_num*nx*nx*sizeof(double));
          if (M==NULL)
              printf("\nError: there is insufficient memory available!\n");
          for (i=0; i&lt;cf_num*nx*nx; i++)
          {
                  fscanf(fpt,"%Lf",&amp;M[i]);
          }
          fclose(fpt);
  
  
          fpt=fopen("input_data/shift_data.txt","r");
          if (fpt==NULL)
          {
              printf("\n Error: Cannot open input file for reading \n");
          }
          OShift=(double *)malloc(nx*cf_num*sizeof(double));
          if (OShift==NULL)
              printf("\nError: there is insufficient memory available!\n");
          for(i=0;i&lt;cf_num*nx;i++)
          {
                  fscanf(fpt,"%Lf",&amp;OShift[i]);
          }
          fclose(fpt);
  
          n_flag=nx;
          func_flag=func_num;
          ini_flag=1;
          //printf("Function has been initialized!\n");
      }
  
  
      for (i = 0; i &lt; mx; i++)
      {
          switch(func_num)
          {
          case 1: 
              sphere_func(&amp;x[i*nx],&amp;f[i],nx,OShift,M,0);
              f[i]+=-1400.0;
              break;
          case 2: 
              ellips_func(&amp;x[i*nx],&amp;f[i],nx,OShift,M,1);
              f[i]+=-1300.0;
              break;
          default:
              printf("\nError: There are only 28 test functions in this test suite!\n");
              f[i] = 0.0;
              break;
          }   
      }
  }
  </code></pre>
  
  <p>I need some advise on it.
  Thanks!</p>