ecl::Array compilation error
I'm trying to make use of the ecl::geometry package, and in doing so must use ecl::array as a container for the inputs. I'm running Ubuntu 18 and Melodic. The relevant lines of code are:
std::vector<ecl::SmoothLinearSpline> splines;
const unsigned int numPtsConst = numPts;
ecl::Array<double> ecl_pos(numPts);
ecl::Array<double> ecl_time(numPts);
for(int i = 1;i<numJts;i++){
for(int j = 1;j<numPts;j++){
ecl_pos[j] = t1[i].positions_[j];
ecl_time[j] = t1[i].time_from_start_[j];
}
double maxAcc = 3*t1[i].max_velocity_;
}
and the error I encounter is
CMakeFiles/runpath_server.dir/src/runpath_server.cpp.o: In function `ecl::StandardException::~StandardException()':
runpath_server.cpp:(.text._ZN3ecl17StandardExceptionD2Ev[_ZN3ecl17StandardExceptionD5Ev]+0xf): undefined reference to `vtable for ecl::StandardException'
CMakeFiles/runpath_server.dir/src/runpath_server.cpp.o: In function `ecl::Array<double, 0ul>::operator[](unsigned long)':
runpath_server.cpp:(.text._ZN3ecl5ArrayIdLm0EEixEm[_ZN3ecl5ArrayIdLm0EEixEm]+0x3f): undefined reference to `ecl::StandardException::StandardException(char const*, ecl::ErrorFlag)'
runpath_server.cpp:(.text._ZN3ecl5ArrayIdLm0EEixEm[_ZN3ecl5ArrayIdLm0EEixEm]+0x4d): undefined reference to `typeinfo for ecl::StandardException'
collect2: error: ld returned 1 exit status
Any assistance in identifying the source of this compilation error would be hugely appreciated.
Asked by jbeck28 on 2019-11-22 10:48:56 UTC
Comments
That is not a compilation error. It is a linking error.
Asked by gvdhoorn on 2019-11-22 11:32:38 UTC
Ah, I suppose that makes sense. I believe I only added
ecl::geometry
to my cmakelists andpackage.xml
, though the code isn't in front of me. I'll try some stuff Monday and hopefully fix this myself. Thank you for your reply.Asked by jbeck28 on 2019-11-24 14:59:32 UTC