sewenew / redis-plus-plus

Redis client written in C++
Apache License 2.0
1.64k stars 351 forks source link

[BUG] Error using redis-plus-plus & log4cpp #451

Closed valendovsky closed 1 year ago

valendovsky commented 1 year ago

Describe the bug I use redis++ and log4cpp libraries in my project. I installed them using the 'vcpkg'. If 'include redis++' are added after 'include log4cpp', then the compiler outputs more than 100 errors inside the redis-plus-plus library. Even if you add them to a simple 'HelloWorld' project, we will still get errors. If you use 'include redis++' first, then the problem disappears. Because of this, you have to dance with a tambourine so that includes are located in the right sequence.

To Reproduce For example:

include <log4cpp/Appender.hh>

include <log4cpp/FileAppender.hh>

include <log4cpp/OstreamAppender.hh>

include <log4cpp/Layout.hh>

include <log4cpp/BasicLayout.hh>

include <log4cpp/Category.hh>

include <log4cpp/Priority.hh>

include <sw/redis++/redis++.h>

Environment:

Thanks.

sewenew commented 1 year ago

Can you give some examples of the error messages you got?

Also since the version (1.3.2) you used is too old, can you try the latest version of redis-plus-plus?

Regards

valendovsky commented 1 year ago

I tried the latest version of redis-plus-plus from the GitHub repository. And the errors disappeared. Now the project has been compiled and works without problems. I launched a project for Windows and Linux. Thanks