Problem solved.
Different from what I thought, this time it is another problem other than the data type transformation.
In Matlab, if you want do to FFT in an arbitrary length like 1000, which is not an integer power of 2, Matlab will fix it for you (by doing an interpolation or zero-padding, I am not sure about it).
However, if you have some command like X=fft(x,1000) in your code, you'll get an error report when exporting it to C/C++, informing you that only a length of an integer power of 2 can be accepted.
Further, if you get some vector with a length of 1000 points and call the FFT function without explicitly giving the target length, like X=fft(x), it CAN pass the compiling WITHOUT any error or warning! However, the result will be completely different from what you mean to get:)
After manually fixing the target transformation length, the reported problem got solved.