title: How to add an hdf5 to a Qt-Project?
body: <p><strong>Situation:</strong></p>
  
  <p>I need to add a library (HDF5 in my case) to my qt project.</p>
  
  <p>I know how to code c++ enough for my purposes, but i have no clue about the <code>.pro</code> file. When i try to google my problem or general guides for adding libraries i find lots of answers but understand none of them, because they require more knowledge then i have. They say stuff like "compile it here and there", "add this and that to your system", "use qmake in directory xyz". Can someone please answer the question so that one who only knows a bit of c++ and the green compile &amp; run button of qt understands it? Would be great :-)</p>
  
  <p><strong>What I tired:</strong></p>
  
  <p>I know that there is a wizarb in qt that can add librarys to projects. I used it to add the libraries needed. I added them as "external librarys".
  I tried as dynamic or static, i tried adding only the <code>hdf5.lib</code> or the <code>hdf5_cpp.lib</code> too.</p>
  
  <p><strong>Problem:</strong></p>
  
  <p>When I do it as I described above and try to use a function from the added library i always get errors like: <code>undefined reference to H5::Function_Name_xyz</code>.<a href="https://i.stack.imgur.com/KqwIe.png" rel="nofollow noreferrer"><img src="https://i.stack.imgur.com/KqwIe.png" alt=""></a></p>
  
  <p><strong>My .pro looks like</strong> (generated by the qt add-library-wizard):</p>
  
  <pre><code>TEMPLATE = app
  CONFIG += console c++11
  CONFIG -= app_bundle
  CONFIG -= qt
  
  SOURCES += \
          main.cpp
  
  
  #Add external static library "hdf5.lib":
  unix|win32: LIBS += -L'C:/Program Files/HDF_Group/HDF5/1.10.2/lib/' -lhdf5
  
  INCLUDEPATH += 'C:/Program Files/HDF_Group/HDF5/1.10.2/include'
  DEPENDPATH += 'C:/Program Files/HDF_Group/HDF5/1.10.2/include'
  
  win32:!win32-g++: PRE_TARGETDEPS += 'C:/Program Files/HDF_Grou/HDF5/1.10.2/lib/hdf5.lib'
  
  
  #Add external static library "hdf5_cpp.lib"
  unix|win32: LIBS += -L'C:/Program Files/HDF_Group/HDF5/1.10.2/lib/' -lhdf5_cpp
  
  INCLUDEPATH += 'C:/Program Files/HDF_Group/HDF5/1.10.2/include'
  DEPENDPATH += 'C:/Program Files/HDF_Group/HDF5/1.10.2/include'
  
  win32:!win32-g++: PRE_TARGETDEPS += 'C:/Program Files/HDF_Group/HDF5/1.10.2/lib/hdf5_cpp.lib'
  </code></pre>
  
  <p><strong>Using:</strong>   </p>
  
  <ul>
  <li>C++</li>
  <li>Qt 5.10.1</li>
  <li>MinGW 32bit</li>
  <li>HDF5 1.10.2</li>
  <li>Windows 7</li>
  </ul>