I am trying to use gorocksdb which is a cgo package wapping the rocksdb library on windows.
- I built the rocksdb library with vcpkg which gave me as output rocksdb-shared.dll. I set the build path to my PATH.
- I installed msys64 in order to have gcc
- I have set
CGO_LDFLAGS="-L/path/to/rocksdb -lrocksdb -lstdc++ -lm -lz -lbz2 -lsnappy -llz4 -lzstd"
- I have renammed rocksdb-shared.dll to librocksdb.dll because the linker requires the dll to start with
- I do the
go get ...command
- I run my test go file and I get the error
The programer can't start because rocksdb-shared.dll is missing ...
- If I rename it back to rocksdb-shared.dll the build fails because the linker can't find librocksdb.dll
- The only way to make it work is to have both rocksdb-shared.dll and librocksdb.dll in the PATH
Why the executable keeps loading rocksdb-shared.dll? I don't find any reference to it in the cgo package.