py-leveldb-windows icon indicating copy to clipboard operation
py-leveldb-windows copied to clipboard

LNK1181: cannot open input file 'python27.lib'

Open jasoncummer opened this issue 8 years ago • 6 comments

Error 115 error LNK1181: cannot open input file 'python27.lib'

I added H:\Python27\libs in the C/C++ Additional include Directories

Update fixed: added it in the linker and it worked

jasoncummer avatar Sep 13 '16 15:09 jasoncummer

Hi Happynear,

I moved on to the test and now I have this error:

Traceback (most recent call last): File "test-py-leveldb.py", line 3, in db = leveldb.LevelDB('./db') AttributeError: 'module' object has no attribute 'LevelDB'

What needs to be done for that one.

From my perspective I just compiled the code, moved the "leveldb.pyd" file to the python34 directory. I'm going to try it in the 27 directory, and looking at the code in the project for perhaps some more insight...

Cheers,

jasoncummer avatar Sep 13 '16 15:09 jasoncummer

maybe we could create a trouble shooting list

The last error was that mistakenly it was in the libs not the lib folder. fixing that now has given me the following error.

Traceback (most recent call last): File "test-py-leveldb.py", line 1, in import leveldb ImportError: Module use of python27.dll conflicts with this version of Python.

I'm using python 3.4, I would prefer not to have to try this with 2.7 as the base. Any suggestions?

This is my path:

import sys print(sys.path) ['', 'C:\Windows\system32\python34.zip', 'H:\Python34\DLLs', 'H:\Python34
\lib', 'H:\Python34', 'H:\Python34\lib\site-packages']

jasoncummer avatar Sep 13 '16 17:09 jasoncummer

I haven't try the Python with version > 3. I can only guarantee the compiling of Python 2.7.

happynear avatar Sep 14 '16 01:09 happynear

Hi, I have upgraded the whole project to VS2015 and added support for Python 3.6. You may try it again!

happynear avatar Jul 03 '17 19:07 happynear

@happynear I tried removing python27.lib from the linker settings and added python36.lib but now it gives an "unresolved external symbol initleveldb" error. I'm using Python 3.6 and I've included all the necessary paths in the project.

muradhasan331 avatar Jul 19 '18 10:07 muradhasan331

i know its quite silly

i've added to linker's additional dependencies than it works

but error occurs LNK1181 inputfile initleveldb.obj is unable to open....

PineLover avatar Aug 23 '18 18:08 PineLover