In class filter.h, I have the following forward declaration
#include "nonlinear.h"
template<class T> //Forward declaration due to circular dependency
class Agc;
//class QuantizerCmplx;
I get the following errors while compiling with g++.
../source/filter.h: In member function âint FarrowFilter<T>::filter_quantize()â:
../source/filter.h:1837: error: invalid use of undefined type âstruct QuantizerCmplxâ
../source/filter.h:12: error: forward declaration of âstruct QuantizerCmplxâ
The compiler is complaining about the following lines
stage1QuantizeWirein=new Wire<T>;
stage1QuantizeWireout=new Wire<T>;
stage1QuantizeSetup = new FixPt( X, X-2, "r", _YES);
stage1Quantize=new QuantizerCmplx(-100046, stage1QuantizeSetup,stage1QuantizeWirein,stage1QuantizeWireout);
It is not able to find QuantizerCmplx even though it is declared in nonlinear.h which I have included. If I use a forward declaration(commented line on top) it compiles with VC++ but gives an error with g++