title: Qt and namespace error with library
body: <p>I had a perfectly working project in Qt and I had to add an external library (*.h and *.cpp) to continue working. However, after adding those files to the project I suddenly have 48 errors and they start with the problem with a namespace...</p>
  
  <p>Here is my .pro file:</p>
  
  <pre><code>    QT       += core gui
  greaterThan(QT_MAJOR_VERSION, 4): QT += widgets
  
  TARGET = ean
  TEMPLATE = app
  
  
  SOURCES += main.cpp\
          mainwindow.cpp \
      IntervalArithmetic.cpp
  
  HEADERS  += mainwindow.h \
      IntervalArithmetic.h
  
  FORMS    += mainwindow.ui
  
  QMAKE_CXXFLAGS += -std=c++11
  
  LIBS += -lmpfr
  LIBS += -lgmp
  </code></pre>
  
  <p>Here is the beginning of my *.h file added:</p>
  
  <pre><code>#ifndef INTERVALARITHMETIC_H_
  #define INTERVALARITHMETIC_H_
  #include &lt;iostream&gt;
  #include &lt;string&gt;
  #include &lt;sstream&gt;
  #include &lt;exception&gt;
  #include &lt;fenv.h&gt;
  #include &lt;stdlib.h&gt;
  #include &lt;stdint.h&gt;
  #include &lt;mpfr.h&gt;
  
  
  using namespace std;
  
  namespace intervalarth
  {
  
  struct interval
  {
      long double a, b;
  };
  
  
  class IntervalArithmetic
  {
  public:
      IntervalArithmetic();
  ...
  </code></pre>
  
  <p>And here is the beginning of the corresponding *.cpp file:</p>
  
  <pre><code>#include "IntervalArithmetic.h"
  
  #include &lt;sstream&gt;
  #include &lt;iomanip&gt;
  #include &lt;stdexcept&gt;
  #include &lt;cfenv&gt;
  #include &lt;cstdlib&gt;
  #include &lt;cstdint&gt;
  #include &lt;climits&gt;
  #include &lt;cmath&gt;
  
  #include "mpfr.h"
  
  using namespace std;
  using namespace IntervalArithmetic;
  ...
  </code></pre>
  
  <p>errors can be seen on this picture:</p>
  
  <p><img src="https://i.stack.imgur.com/zb3lB.png" alt="enter image description here"></p>
  
  <p>Could you please help me?</p>