It appear you are declaring the same object in two *.cpp files. That will happen if you declare something in a header file then include that header file in all *.cpp files. What you need to do to corect that is declare it with the extern keyword in the header file, then on only ONE of the *.cpp files declare it again without extern
// header file named myheder.h (or whatever name you want to give it)
extern double u_err;
#include <myheader.h>
// one of the *.cpp files
double u_err = 0.0;