3
votes

I was trying to integrate Python interpreter in C++ application in Visual Studio 2013, despite of adding INCLUDES and ENV VARIABLES such as LIB & LIBPATH, compilation is throwing an Error as

LINK : fatal error LNK1104: cannot open file 'python37_d.lib'.

I tried all possible google suggestions, but still I am not able get rid of this Error. Any help on this would be highly appreciated.

1
What are your settings for library path and include path as well as the libraries to link? - The Floating Brain
Hi,Settings are as below: Include Path: (Proporties->Configuration Properties->VC++ Directories->Include Directories) C:\Users\Shridhar\AppData\Local\Programs\Python\Python37\include -----> This is where Python37 resides Library Path:(Proporties->Configuration Properties->VC++ Directories->Libraries Directories) C:\Users\Shridhar\AppData\Local\Programs\Python\Python37\libs -----> libraries folder - Shridhar Y Bhandiwad
Cool, and what does it say for "additional dependencies?" - The Floating Brain
Here's the obvious question, do you have a file called C:\Users\Shridhar\AppData\Local\Programs\Python\Python37\libs\python37_d.lib? Because your linker is telling you that you don't. - john
@john On my machine in the same folder for python 36 I just have python36.lib and python3.lib - The Floating Brain

1 Answers

6
votes

This library is intended for debugging, and you simply don't have it if the Python was installed with default options. To obtain it, you are to (re)install Python with "Download debug binaries" option enabled in the installer. Then the python37_d.lib will be located in %PythonPath%\Libs together with python3_d.lib.