0

I have a piece of code in C++ into which I am trying to include the Python.h library in order to manage the GIL (to speed things up). Despite adding the proper includes, libraries and path addresses (I am using Visual Studio 2019), I still obtain the following error message:

error_message

As far as I know, I correctly added the address of the DLL in the $PATH for this project, as shown:

project_properties

What am I forgetting here?

patrick2016
  • 73
  • 1
  • 8

1 Answers1

0

Are you running this program in release mode? After switching from debug to release, the project properties of debug mode will not be inherited, so it is necessary to reset the project properties.

You could also try to place the dll file in the .exe directory or write the dll path into the project properties.

At the same time, it is also necessary to check whether the dll file is accidentally deleted by the antivirus software.

Yujian Yao - MSFT
  • 945
  • 1
  • 3
  • 9