[Subject Prev][Subject Next][Thread Prev][Thread Next][Date Index][Thread Index]

[hts-users:01787] Re: Speech Signal Processing Toolkit SPTK-3.2


Hi,

Add the same problem ...

It has to to with the declaration of the function .... it's statically declared after the "dct_create_table" function (not standard c conforming).

Just take it off the main function and place it in the global scope like this:

static int dct_create_table(const int nSize);
static int dct_create_table(const int nSize)
{
....

Carlos Mendes

Alexis Moinet wrote:
Hi

I can confirm the same error

dct.c:243: error: invalid storage class for function «dct_create_table»

with

gcc (GCC) 4.2.4 (Ubuntu 4.2.4-1ubuntu3)

moving lines 242-245 :

int dft(float *pReal, float *pImag, const int nDFTLength);
static int dct_create_table(const int nSize);
int dct_based_on_dft(float *pReal, float *pImag, const float *pInReal,
const float *pInImag);

outside of main() seems to work (no error at compilation time)

Somehow it looks like gcc doesn't like function declaration inside main().

Alexis


康世胤 wrote :
hi, Dr. Tokuda
there is an error when I compile the code:

dct.c:243: error: invalid storage class for function 'dct_create_table'

and I use "gcc version 4.3.0 20080428 (Red Hat 4.3.0-8) (GCC)"

it seems that the function can not be static here.




Follow-Ups
[hts-users:01788] Re: Speech Signal Processing Toolkit SPTK-3.2, Keiichi Tokuda
References
[hts-users:01784] Speech Signal Processing Toolkit SPTK-3.2, Keiichi Tokuda
[hts-users:01785] Re: Speech Signal Processing Toolkit SPTK-3.2, =?iso-2022-jp?b?GyRCOS9AJDB9GyhC?=
[hts-users:01786] Re: Speech Signal Processing Toolkit SPTK-3.2, Alexis Moinet