首先创建一个MFC或控制台程序,然后右键工程属性,在VC++目录选项页中分别加入python的包含文件目录和库文件目录:C:/ProgramFiles/Python35/includeC:/ProgramFiles/Python35/libsC:/ProgramFiles/Python35/Lib