Undefined reference to: Arith::mpmod
Feb 11, 2012 at 12:14pm UTC
This error has recently appeared
undefined reference to `libbase::Arith::mpmod(std::vector<unsigned char, std::allocator<unsigned char> > const&, std::vector<unsigned char, std::allocator<unsigned char> > const&)'
1 2 3 4 5 6 7 8
struct Arith{
bigint operator %(const bigint& x) const {
bigint r;
libbase::Arith ar;
r.value = ar.mpmod(value, x.value); // Error caused here
return r;
}
}
Prototype
1 2 3 4 5
std::vector<unsigned char > mpmod(const std::vector<unsigned char >& u,
const std::vector<unsigned char >& v);
std::vector<unsigned char > mpmod(std::vector<unsigned char >& u,
std::vector<unsigned char >& v);
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16
std::vector<unsigned char > Arith::mpmod(const std::vector<unsigned char >& u,
const std::vector<unsigned char >& v) {
std::vector<unsigned char > w = mpdiv(u, v);
w = mpmul(w, v);
return mpsub(u, w);//mpmul(w, v));
}
std::vector<unsigned char > Arith::mpmod(std::vector<unsigned char >& u,
const std::vector<unsigned char >& v) {
std::vector<unsigned char > w = mpdiv(u, v);
w = mpmul(w, v);
return mpsub(u, w);//mpmul(w, v));
}
Topic archived. No new replies allowed.