You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Hi,
This is a nasty one.
I spent 3 days on it.
The problem:
When I include redis-plus-plus after some include that has, down the line includes of <windows.h> and / or <shlwapi.h>
The project will not compile and give errors like i forgot to put semicolon somewhere.
When commented it compiles fine.
When redis-plus-plus is included before those, also everything is fine.
// This is fine
#include <sw/redis++/redis++.h>
#include <windows.h>
// This will breake
#include <windows.h>
#include <sw/redis++/redis++.h>
Any idea?
Thanks
The text was updated successfully, but these errors were encountered:
@orennitzan I did some research, and it seems that the root cause is we must ensure to include winsock2.h before windows.h.
hiredis depends on timeval struct, and on Windows platform, this struct is defined in winsock2.h. So redis-plus-plus includes this header. However, there's some problem with winsock2.h and windows.h files, and we must ensure that winsock2.h is included before windows.h, otherwise, you'll get some wired errors. Please check the following links for reference:
Hi,
This is a nasty one.
I spent 3 days on it.
The problem:
When I include redis-plus-plus after some include that has, down the line includes of <windows.h> and / or <shlwapi.h>
The project will not compile and give errors like i forgot to put semicolon somewhere.
When commented it compiles fine.
When redis-plus-plus is included before those, also everything is fine.
// This is fine
#include <sw/redis++/redis++.h>
#include <windows.h>
// This will breake
#include <windows.h>
#include <sw/redis++/redis++.h>
Any idea?
Thanks
The text was updated successfully, but these errors were encountered: