0

I want to compile my python code with cython. Compilation of my code in cython is without problems, but I can't compile it to executable.

cl .\setup.c /I C:\Users\Host\AppData\Local\Programs\Python\Python37\include

And error I am getting is

/out:setup.exe
setup.obj
LINK : fatal error LNK1104: cannot open file 'python37.lib'

I am using 64 bit version of Windows 10 and python 3.7

Thanks a lot.

1 Answer 1

2

LNK1104 means the linker could not find python37.lib in the default paths set in the LIB environment.

To correct that, the directory of python37.lib needs to be added to the library search path passed to the linker. Given the posted command line, this would most likely be:

cl .\setup.c /I "C:\Users\Host\AppData\Local\Programs\Python\Python37\include" /link /LIBPATH:"C:\Users\Host\AppData\Local\Programs\Python\Python37\libs"
Sign up to request clarification or add additional context in comments.

Comments

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.