Seems more like a case of include "file.cpp" in multiple places (this is a bad thing to do).
Salem
Posting Sage
11,531 posts since Dec 2005
Reputation Points: 5,862
Solved Threads: 953
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;
Ancient Dragon
Retired & Loving It
30,049 posts since Aug 2005
Reputation Points: 5,662
Solved Threads: 2,343