I've got a .c file that has Python.h in it and I want to compile it.
This is what I'm entering into the cmd line at the moment
cl -IC:\[...]\Python35\include -IC:\[...]\Python35\libs TestFilePython.c
Which results in the error:
LINK : fatal error LNK1104: cannot open file 'python35.lib'
I've found this which seems to be the perfect fit for my question, but I cannot figure out what LIBPATH
s I should include. Could someone help me with that?
edit: Okay so I'm actually using cpp so setup.py looks like this:
from distutils.core import setup
from Cython.Build import cythonize
setup(ext_modules = cythonize(
"TestFilePython.pyx", # our Cython source
language="c++", # generate C++ code
))
Running python setup.py build_ext --inplace
results in a .cpp being created (.c before language option)
Now I'm trying to compile that .cpp. While searching I've just come across the idea that I need to include an embed option (this might solve the no entry point problem), still trying to see what I can do that.
TestFilePython.pyx is just: print("Hello World")
, if asked I can also print the contents of cpp that is created.