windowsgogcccgogccgo

cgo on windows : naming of loaded dll


I am trying to use gorocksdb which is a cgo package wapping the rocksdb library on windows.

Why the executable keeps loading rocksdb-shared.dll? I don't find any reference to it in the cgo package.


Solution

  • I think I found the answer to my question.

    I think I can't rename the compiled dll because the dll "reference" itself as this name. So it won't load properly.

    To resolve my problem I just renamed the parameter in the LDFLAG from -lrocksdb to -lrocksdb-shared in both my environement variable and in this file