2

I am transpiling python files with cython to C++ using the embed option.
I then try to compile it using cl.exe:

cl .\Some_File.cpp /I 'C:\Program Files\Python\Python36\include'

which retruns the error:

fatal error C1083: Cannot open include file: 'Python.h': No such file or directory

if I put python.h in the same directory, it moves on to the next include error. (also a file in the python include folder, expected behavior.)
But according tot he MS docs on cl /I is the correct parameter, so I'm stumped: https://msdn.microsoft.com/en-us/library/73f9s62w.aspx

kazaamjt
  • 121
  • 1
  • 7

1 Answers1

1

ANSWER

Hey guys, so for all who is stuck with this problem , you can use:

cl /I "<path>" filename.c

NOTES

  1. It seems the double quotes are important (I have tried a lot many times to compile without double quotes and it didn't work).

  2. The path here can be absolute or relative.