Can';在vscode中不包括QTime
我已将Can';在vscode中不包括QTime,qt,visual-studio-code,Qt,Visual Studio Code,我已将c_cpp_properties.json设置为: { "configurations": [ { "name": "Mac", "includePath": [ "${workspaceFolder}/**", "/usr/local/Cellar/qt/5.13.2/include/QtCore" ],
c_cpp_properties.json
设置为:
{
"configurations": [
{
"name": "Mac",
"includePath": [
"${workspaceFolder}/**",
"/usr/local/Cellar/qt/5.13.2/include/QtCore"
],
"defines": [],
"macFrameworkPath": [
"/Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX.sdk/System/Library/Frameworks"
],
"compilerPath": "/usr/bin/clang",
"cStandard": "c11",
"cppStandard": "c++17",
"intelliSenseMode": "clang-x64"
}
],
"version": 4
}
它报告:包括检测到的错误。请更新您的includePath。此翻译单元(/Users/...cpp).C/C++(1696)禁用了波形
无法打开源文件“QtCore/qstring.h”(“QTime”的依赖项)``编译器正在查找
“QtCore/qstring.h”
。根据您已经指定的包含路径,我猜将在
“/usr/local/ceral/qt/5.13.2/include”
因此,您需要将其添加到包含路径列表中。编译器正在查找
“QtCore/qstring.h”
。根据您已经指定的包含路径,我猜将在
“/usr/local/ceral/qt/5.13.2/include”
因此,您需要将其添加到包含路径列表中。添加
"compileCommands": "${workspaceFolder}/build/compile_commands.json",
到您的配置文件
请参见添加
"compileCommands": "${workspaceFolder}/build/compile_commands.json",
到您的配置文件
请参见如果使用CMake,要使此文件存在,请确保CMake通过使用
set(CMake\u EXPORT\u COMPILE\u命令打开)生成该文件。
如果使用CMake,要使此文件存在,请确保CMake通过使用set(CMake\u EXPORT\u COMPILE\u命令打开)生成该文件。