wbolster / plyvel

Plyvel, a fast and feature-rich Python interface to LevelDB
https://plyvel.readthedocs.io/
Other
529 stars 75 forks source link

fatal error LNK1 120: 15 unresolved externals #70

Closed iNomaD closed 6 years ago

iNomaD commented 6 years ago

I have installed leveldb from here: https://github.com/Microsoft/vcpkg/tree/master/ports/leveldb. Now I get errors when compiling with pip install plyvel

    _plyvel.obj : warning LNK4197: export 'PyInit__plyvel' specified multiple ti
mes; using first specification
       Creating library build\temp.win-amd64-3.5\Release\plyvel\_plyvel.cp35-win
_amd64.lib and object build\temp.win-amd64-3.5\Release\plyvel\_plyvel.cp35-win_a
md64.exp
    leveldb.lib(env_win.cc.obj) : error LNK2001: unresolved external symbol __im
p_PathFileExistsW
    build\lib.win-amd64-3.5\plyvel\_plyvel.cp35-win_amd64.pyd : fatal error LNK1
120: 1 unresolved externals
    error: command 'C:\\Program Files (x86)\\Microsoft Visual Studio 14.0\\VC\\B
IN\\x86_amd64\\link.exe' failed with exit status 1120

UPD. Solved. The problem was library shlwapi.lib, which containts function PathFileExists, is not linked during installing through pip. Finished with an ugly hack with merging it into leveldb.lib: lib.exe /OUT:c.lib leveldb.lib ShLwApi.Lib

wbolster commented 6 years ago

hmm, i know nothing about windows, sorry.

is there anything that should change inside plyvel?

ghost commented 5 years ago

hi @iNomaD , i'm facing the same problem, but am not sure how to implement your solution. would it be possible to explain which directory i need to go to to find lib.exe? thanks and apologies, real noob here