Porting library code base to arduino

It would probably be helpful if you provided the code and full error output.