Skip to content

Undefined symbol rocksdb::CreateDBStatistics() #26

@spiritloose

Description

@spiritloose

Hi,

I got an error when compiling the following my test program.

Undefined symbols for architecture x86_64:
  "rocksdb::CreateDBStatistics()", referenced from:
      _main in test-5grmFu.o
ld: symbol(s) not found for architecture x86_64

This function is used only for testing?

Regards,

#include <cassert>
#include <rocksdb/db.h>
#include <rocksdb/statistics.h>

int main() {
    rocksdb::DB* db;
    rocksdb::Options options;
    options.create_if_missing = true;
    options.statistics = rocksdb::CreateDBStatistics();
    rocksdb::Status status = rocksdb::DB::Open(options, "/tmp/rocks.db", &db);
    assert(status.ok());
    return 0;
}

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions