Hi,
I am facing a few problems with "undefined reference to " errors. I may not be able to post the code, but the declarations and the way I am calling the functions are as follows:
Declarations:
template <typename T>
int pitch_detect(deque<T>& x, int offset, int len);
template <typename T>
int is_voiced(
deque<T>& x, int offset, int len,
double avg_energy, int pre_voice,
short& s_flag,
long nsamples
);
I am calling the above functions as follows:
x = is_voiced(superFrame_, cur_offset_, f_len_,
avgEnergy_, frame_voicing_[1], silence_flag_, nsamples_);
y = pitch_detect(superFrame_, cur_offset_, f_len_);
The above statements (where I am calling the functions), get flagged as errors. These are the messages:
undefined reference to `int is_voiced(std::deque >&, int, int, double, int, short&, long)
undefined reference to `int pitch_detect(std::deque >&, int, int)'
Any help in decoding the above errors is most welcome. Thanks, Sriram
Edit: The above functions are defined in a separate header and corresponding C++ file. I get no problems when I try to compile them and create an object file. These errors are seen in the linker stage.