ecl::Array compilation error

asked 2019-11-22 09:48:56 -0500

jbeck28 gravatar image

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.

edit retag flag offensive close merge delete

Comments

That is not a compilation error. It is a linking error.

gvdhoorn gravatar image gvdhoorn  ( 2019-11-22 10:32:38 -0500 )edit

Ah, I suppose that makes sense. I believe I only added ecl::geometry to my cmakelists and package.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.

jbeck28 gravatar image jbeck28  ( 2019-11-24 13:59:32 -0500 )edit