fixing compiling errors related to libraries and Qt5