My c function is fft and input is complex number. but xc return int value
in my function header
cfunction.h
Code: Select all
#define CFUNCTION_H_
#ifdef __XC__
#define EXTERNAL extern
#else
#define EXTERNAL extern "C"
#endif
#include <xccompat.h>
#include <complex.h>
typedef complex cplx
EXTERNAL int cfunction(int samples[]);
//EXTERNAL void fft(cplx x[], int n);
#endif /* CFUNCTION_H_ */
compiler says : error: parse error before "cplx"
how to correctly use c codes in xc?
also fft includes pointer. But xc does not support pointers as I know.
even I do the following:
#include <xccompat.h>
#include <complex.h>
EXTERNAL void fft(complex x[], int n);
compiler say:error: parse error before "_Complex"
_Complex is inside the complex.h of xc
any suggession?