C++ calls Python function

Environment configuration

  1. Install Python

  2. Install Visual Studio

    Sample environment: Python3.7-64bit; VS2015

  3. Fill in the python installation path\include path in Include Directories

  4. Fill in the python installation path\libs path in Library Directories

  5. In debug mode, fill in the python installation path \libs\python37.lib path in Aditional Dependencies; in
    release mode, fill in the python installation path \libs\python37_d.lib path in Aditional Dependencies
    ❗ Note that if there is no python37_d.lib, just put python37 Make a copy of .lib and name it python37_d.lib
    insert image description here

insert image description here

Guess you like

Origin blog.csdn.net/weixin_45267471/article/details/107663718