Why i am gettting error: 'QtMsgHandler' does not name a type' ?
-
when i include log4Qt library in qt and build project at that time i am getting below error
/home/log4qt/logmanager.h:267: error: 'QtMsgHandler' does not name a type
QtMsgHandler mOldQtMsgHandler;
^Is there any solution is there for this error in qt 5.5.1 ?
-
@Qt-embedded-developer What log4Qt version do you use? In master branch there is no such line in logmanager.h
-
-
@jsulm Sorry for earlier i mentioned my qt version is 5.12.
Actually My qt version is 5.5.1. and so i get 2 error :
/home/src/log4qt/log4qt.h:463: error: #error "Log4Qt requires Qt version 5.12.0 or higher"
error "Log4Qt requires Qt version 5.12.0 or higher"
To resolve this error when i comment below part of code
#if QT_VERSION < QT_VERSION_CHECK(5, 12, 0) # error "Log4Qt requires Qt version 5.12.0 or higher" #endif
i get another error
/home/mangal/WORK_SOFTRONICS/Project/24JULY21/LZ-50/trunk/Log4Qt/src/log4qt/logmanager.h:279: error: 'QVersionNumber' does not name a type
static QVersionNumber versionNumber();
^
QVersionNumberWhat is solution for this issue ?
-
@Qt-embedded-developer said in Why i am gettting error: 'QtMsgHandler' does not name a type' ?:
error "Log4Qt requires Qt version 5.12.0 or higher"
to resolve this error when i comment below part of codeAnd you really think the message is there for no reason??
-
@Qt-embedded-developer Please take time to read the link I provided, you will find this there:
"Minimum Qt version required Qt5.12 (for support of Qt versions down to 5.3 use branch 1.4 or the lates 1.4.x release or for support of Qt versions down to 5.7 use branch 1.5 or the lates 1.5.x release)".
So, if you want to use your old Qt version then use Log4Qt version 1.4 (checkout branch 1.4). -
@Christian-Ehrlicher Sorry for trying that.
-
This post is deleted!