happynear / py-leveldb-windows

A Visual Studio project to build leveldb python wrapper
94 stars 30 forks source link

LNK1181: cannot open input file 'python27.lib' #3

Open jasoncummer opened 7 years ago

jasoncummer commented 7 years ago

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 commented 7 years ago

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 commented 7 years ago

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']

happynear commented 7 years ago

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

happynear commented 7 years ago

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

muradhasan331 commented 6 years ago

@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.

PineLover commented 5 years ago

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....