abumq / easyloggingpp

C++ logging library. It is extremely powerful, extendable, light-weight, fast performing, thread and type safe and consists of many built-in features. It provides ability to write logs in your own customized format. It also provide support for logging your classes, third-party libraries, STL and third-party containers etc.
MIT License
3.75k stars 918 forks source link

Qt 6.4.0 easylogging++.h:444: error: QLinkedList: No such file or directory #822

Open DmitryDemidov80 opened 1 year ago

DmitryDemidov80 commented 1 year ago

Hi! I try compile my project on Qt 6.4.0 but failed. I added QT += core5compat to my .pro-file but it didn't help.

easyloggingpp/src/easylogging++.h:444:13: fatal error: QLinkedList: No such file or directory 444 | # include

How to fix it? Thanks!

ghost commented 1 year ago

Hi!

I compiled with the latest version of easylogging and Qt 6.4.0

Configuration:

  1. pro file
greaterThan(QT_MAJOR_VERSION, 5): QT += core5compat
DEFINES += \
    ELPP_QT_LOGGING \
    ELPP_STRICT_SIZE_CHECK ELPP_UNICODE \
    ELPP_MULTI_LOGGER_SUPPORT \
    ELPP_THREAD_SAFE \
    ELPP_UNICODE \
    ELPP_NO_DEFAULT_LOG_FILE \
    AUTO_INITIALIZE_EASYLOGGINGPP
  1. Change #include <QString> to #include <QStringRef>
  2. // ELPP_ITERATOR_CONTAINER_LOG_ONE_ARG(QList)

Hope that helps