MEONMedical / Log4Qt

Log4Qt - Logging for the Qt cross-platform application framework
Apache License 2.0
580 stars 234 forks source link

compiling against Qt5.3 with msvc 19 error in v1.4.2 #68

Closed omortie closed 2 years ago

omortie commented 2 years ago

I'm trying to compile Log4Qt (v1.4.2 that you said is compatible down to Qt5.3) with msvc19 (2022) and for Qt5.3 but I will get a message regarding GCC?! below: Log4Qt\src\log4qt\log4qt.h(484): fatal error C1189: #error: "Log4Qt requires at least gcc version 4.8 or higher for used c++11 features" I don't get it what it have to do with GCC?

andibacher commented 2 years ago

`// Q_CC_GNU not defined correct in Qt5.3

if QT_VERSION <= QT_VERSION_CHECK(5, 4, 0)

undef Q_CC_GNU

define Q_CC_GNU (GNUC * 100 + __GNUC_MINOR__)

endif`

I remember ther was some problem the define Q_CC_GNU in Qt Version 5.3. Probably this fix for this (see code above) causes your problem. With msvc.

omortie commented 2 years ago

I managed to compile it with Qt5.3 and msvc2013 and it was successfully completed. but I did commented some of your code constraints that they forbid of using msvc < 1900 it was not possible for me to compile project using msvc > 1900 and Qt5.3 because I don't have it's binary kits I just have Qt5.3 for msvc2013 by the way thank you for your guide I had to write #undef Q_CC_GNU first