Skip to content

Initializing Redis++ on IDE #5

Closed
@afifzaki

Description

@afifzaki

Hi, thanks for your work.
I try to compile a simple cpp program:

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

using namespace sw::redis;

int main()
{
auto redis = Redis("tcp://127.0.0.1:6379");
return 0;
}

but that script generate an error:

/home/user/Developments/clang/redis_test/main.cpp:10: undefined reference to sw::redis::Redis::Redis(std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> > const&)' CMakeFiles/redis_test.dir/main.cpp.o: In function sw::redis::Connection::ContextDeleter::operator((redisContext*) const':
/usr/local/include/sw/redis++/connection.h:132: undefined reference to `redisFree'

Is there a simplest example do you provide for initiating redisDB?

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions