Mentions légales du service

Skip to content

Can't find abi:cxx11 tagged method from Dashel dynamic library on Windows

Aseba should be able to compile with the default build of Dashel. By default, Dashel builds with shared libraries. Unfortunately, Aseba will only compile with a static library version of Dashel on Windows.

Specifically, Aseba::Zeroconf asks Dashel to return a target parameter as a string. Template handling must have changed in C++11, because it is an ABI C++11 version of the method that can't be found:

Linking CXX executable asebastudio.exe

../../common/zeroconf/libasebazeroconf.a(zeroconf.cpp.obj): In function `ZNK6Dashel6Stream18getTargetParameterB5cxx11EPKc':
C:/src/dist/windows/include/dashel/dashel.h:330: 
undefined reference to `Dashel::ParameterSet::get[abi:cxx11](char const *) const

The call in Aseba::Zeroconf that leads to the linker error is https://github.com/aseba-community/aseba/blob/cb260fca437afbc1265763a4d9076ac41e6df0c7/common/zeroconf/zeroconf.cpp#L337 which is implement in Dashel by

const std::string& getTargetParameter(const char* param) const { return target.get(param); }

I admit that the Aseba::Zeroconf code should use int Dashel::ParameterSet::get<int>(char const*) const but fixing it at this stage would mask the linker error and I would prefer to fix that first.