Código:
y los errores que obtengo son los siguientes:(en xfuzzy.h) class FuzzyInferenceEngine { public: virtual double* crispInference(double* input) = 0; virtual double* crispInference(MembershipFunction* &input) = 0; virtual MembershipFunction** fuzzyInference(double* input) = 0; virtual MembershipFunction** fuzzyInference(MembershipFunction* &input) = 0; }; (en esp_9_class_ideal.h) class esp_9_class_ideal: public FuzzyInferenceEngine { public: esp_9_class_ideal() {}; virtual ~esp_9_class_ideal() {}; virtual double* crispInference(double* input); virtual double* crispInference(MembershipFunction* &input); virtual MembershipFunction** fuzzyInference(double* input); virtual MembershipFunction** fuzzyInference(MembershipFunction* &input); void inference( double _i_speed, double _i_steer, double _i_ang_vel, double _i_lat_force, double *_o_oversteer ); private: void RL_esp(MembershipFunction &speed, MembershipFunction &steer, MembershipFunction &ang_vel, MembershipFunction &lat_force, MembershipFunction ** _o_oversteer_9); }; (en main.c) int main( int argc, char **argv ) { esp_9_class_ideal esp9ideal; ... esp9ideal.inference((double)vel2, (double)steer, (double) angvel, (double)lat_force, & oversteer); ... }
offroad-main.o: In function `esp_9_class_ideal':
esp_9_class_ideal.h:175: undefined reference to `vtable for esp_9_class_ideal'
In function `main':
/main.cpp:439: undefined reference to `esp_9_class_ideal::inference(double, double, double, double, double*)'
offroad-main.o: In function `~esp_9_class_ideal':
/esp_9_class_ideal.h:176: undefined reference to `vtable for esp_9_class_ideal'
Si comento/elimino la llamada a inference en el main desaparecen los errores de compilacion. No entiendo que es lo que estoy haciendo mal!!! A que se deben los errores "undefined reference to `vtable for esp_9_class_ideal'" ???
Muchas gracias