I know, there is a lot of similar questions, but solutions from existing threads don't help me.
I have installed QT6.2.2 (official installer) on MacOS 12.0.1. Project (cmake) opens and builds fine in QTCreator. In VSCode project builds and intellisense mostly works fine, except for this includes (with QtWidgets, QtCore, etc. prefixes):
#include <QtWidgets/qtwidgetsglobal.h>
#include <QtCore/qcoreapplication.h>
#include <QtGui/qwindowdefs.h>
Errors like this:
cannot open source file "QtGui/qwindowdefs.h" C/C++(1696)
This is in settings.json:
"cmake.configureArgs": [
"-DCMAKE_PREFIX_PATH:STRING=/Users/nshibalov/Qt/6.2.2/macos"
],
c_cpp_properties.json:
{
"configurations": [
{
"name": "Mac",
"macFrameworkPath": [
"/Library/Developer/CommandLineTools/SDKs/MacOSX.sdk/System/Library/Frameworks",
"/Users/nshibalov/Qt/6.2.2/macos/lib"
],
"compilerPath": "/usr/bin/clang++",
"cStandard": "c17",
"cppStandard": "c++17",
"intelliSenseMode": "macos-clang-x64",
"compileCommands": "${workspaceFolder}/build/compile_commands.json"
}
],
"version": 4
}
I have tried alot solutions with configurationProvider and mergeConfigurations params, tried to add all include paths from compile_commands.json to includePath (recursive and not) without success.
I'm new to MacOS world and there is a guess that this somehow connected to Frameworks.
I really hope for your help.