I've compiled my code and I got the following error:

hw01-question1-2-main.cpp:(.text+0x257): undefined reference to `void MatlabPlotter::plot<25, 25>(ece373::vector<ece373::vector<double, 2>, 25> const&, ece373::vector<ece373::vector<double, 4>, 25> const&, double)'
CMakeFiles/simulation_new.dir/hw01-question1-2-main.cpp.o: In function `ece373::vector<ece373::vector<double, 4>, 25> const& Simulator<25, 25>::run<25, 25>(ece373::vector<ece373::vector<double, 2>, 25>&, double)':
hw01-question1-2-main.cpp:(.text._ZN9SimulatorILi25ELi25EE3runILi25ELi25EEERKN6ece3736vectorINS3_IdLi4EEEXT_EEERNS3_INS3_IdLi2EEEXT0_EEEd[ece373::vector<ece373::vector<double, 4>, 25> const& Simulator<25, 25>::run<25, 25>(ece373::vector<ece373::vector<double, 2>, 25>&, double)]+0x67): undefined reference to `Vehicle::getNextState(ece373::vector<double, 2> const&, double)'

can someone please help me on how to debug this error

Well, it's obviously something wrong with your vector. Try posting the whole code, so we can tell you a little more about it.

I've attached my whole code as a zip file below, the weird thing is that if I compile it without the -DECE373 it could compile... if you see from my code there's a bunch of preprocessor statements, this is because I want to generate to executable, one is using the std::vector and the other one is using my own templatized vector... I hope the code can explain it self.. If you have questions please ask me... thanks for willing to help me out

Be a part of the DaniWeb community

We're a friendly, industry-focused community of developers, IT pros, digital marketers, and technology enthusiasts meeting, networking, learning, and sharing knowledge.