Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Cannot make successfully with -DLOGGING_ENABLED=1 : "error: expected unqualified-id" #79

Open
themarwhal opened this issue Feb 25, 2021 · 1 comment

Comments

@themarwhal
Copy link

cpp-redis version : master 99b1dda

Describe the bug
I'm following the build instructions here: https://github.com/cpp-redis/cpp_redis/wiki/Mac-&-Linux-Install
With the logging enabled flag as described here: https://github.com/cpp-redis/cpp_redis/wiki/Compilation-and-installation-options#enable-logging

The make step fails with:

In file included from /Users/marwhal/Desktop/cpp_redis/sources/builders/array_builder.cpp:23:
In file included from /Users/marwhal/Desktop/cpp_redis/includes/cpp_redis/builders/array_builder.hpp:26:
In file included from /Users/marwhal/Desktop/cpp_redis/includes/cpp_redis/builders/builder_iface.hpp:29:
In file included from /Users/marwhal/Desktop/cpp_redis/includes/cpp_redis/core/reply.hpp:29:
/Users/marwhal/Desktop/cpp_redis/includes/cpp_redis/misc/optional.hpp:59:21: error: expected unqualified-id
    __CPP_REDIS_LOG(1, "value_or(U&& v)\n")
                    ^
2 warnings and 1 error generated.
make[2]: *** [CMakeFiles/cpp_redis.dir/sources/builders/array_builder.cpp.o] Error 1
make[1]: *** [CMakeFiles/cpp_redis.dir/all] Error 2

Versions:

➜  build git:(master) gcc --version
Configured with: --prefix=/Library/Developer/CommandLineTools/usr --with-gxx-include-dir=/Library/Developer/CommandLineTools/SDKs/MacOSX.sdk/usr/include/c++/4.2.1
Apple clang version 11.0.3 (clang-1103.0.32.59)
Target: x86_64-apple-darwin19.6.0
Thread model: posix
InstalledDir: /Library/Developer/CommandLineTools/usr/bin
@themarwhal
Copy link
Author

Looks like the solution is to replace the int value with warn/debug/etc as done in this PR (https://github.com/cpp-redis/cpp_redis/pull/69/files).

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant