我已经在c_cpp_properties.json中设置了includePath,该文件指向python3.7m,而python3.7m拥有此文件。
{
"configurations": [
{
"name": "Mac",
"includePath": [
"/Library/Frameworks/Python.framework/Versions/3.7//include/python3.7m",
"${workspaceFolder}/**"
],
"defines": [
"_DEBUG"
],
"macFrameworkPath": [],
"compilerPath": "/usr/local/bin/gcc-8",
"cStandard": "c11",
"cppStandard": "c++17",
"intelliSenseMode": "clang-x64"
}
],
"version": 4
}
当我创建一个名为foo.cpp的文件并包含Python.h时
#include <Python.h>
错误消息说找不到“ Python.h”文件。但是智能提示还可以。