Open leejw51 opened 5 years ago
I'm struggling with this issuse for a week. any ideas? maybe librocksdb is broken?
I'm not aware of anyone active in issues who is using MingW. I suggest you try https://www.prod.facebook.com/groups/rocksdb.dev/ where there might be wider audience.
Or maybe @adamretter has any experience on this?
@siying I am afraid that I have no experience with MingW.
I did read that the CockroachDB team are using MSYS2 instead of MingW as they understood that MingW is now defunct - search in this page for mingw - https://www.cockroachlabs.com/blog/windows-binary/
Expected behavior
I am using mingw64 on windows
Actual behavior
I installed by "pacman -S rocksdb" by somehow g++ a.c -lrocksdb
C:\msys64\tmp\cc1MC5r2.o:a.c:(.text+0xc7): undefined reference to
rocksdb::DBOptions::IncreaseParallelism(int)' C:\msys64\tmp\cc1MC5r2.o:a.c:(.text+0xde): undefined reference to
rocksdb::ColumnFamilyOptions::OptimizeLevelStyleCompaction(unsigned long long)' C:\msys64\tmp\cc1MC5r2.o:a.c:(.text+0x103): undefined reference torocksdb::DB::Open(rocksdb::Options const&, std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> > const&, rocksdb::DB**)' C:\msys64\tmp\cc1MC5r2.o:a.c:(.text$_ZN7rocksdb7OptionsC1Ev[_ZN7rocksdb7OptionsC1Ev]+0x1a): undefined reference to
rocksdb::DBOptions::DBOptions()' C:\msys64\tmp\cc1MC5r2.o:a.c:(.text$_ZN7rocksdb7OptionsC1Ev[_ZN7rocksdb7OptionsC1Ev]+0x2c): undefined reference to `rocksdb::ColumnFamilyOptions::ColumnFamilyOptions()'Steps to reproduce the behavior
here is a.c a.c)
include
include
include "rocksdb/db.h"
include "rocksdb/slice.h"
include "rocksdb/options.h"
using namespace rocksdb;
std::string kDBPath = "/tmp/rocksdb_simple_example";
int main() { DB* db; Options options; // Optimize RocksDB. This is the easiest way to get RocksDB to perform well options.IncreaseParallelism(); options.OptimizeLevelStyleCompaction(); // create the DB if it's not already present options.create_if_missing = true;
// open DB Status s = DB::Open(options, kDBPath, &db); assert(s.ok());
return 0; }