I am trying to create a graphical application with QT, I would like to code it in VS Code. I had installed QT 6.0.2 with the QT Creator installer.
To compile the C++, I use mingw810_64 which is located here : C:/Qt/Tools/mingw810_64/bin/g++.exe
And so my libraries are located here : C:/Qt/6.0.2/mingw81_64/include/
I have well modified the file c_cpp_properties.json
:
{
"configurations": [
{
"name": "Win64",
"includePath": [
"${default}",
"C:/Qt/6.0.2/mingw81_64/include/"
],
"defines": [
"_DEBUG",
"UNICODE",
"_UNICODE"
],
"windowsSdkVersion": "10.0.19041.0",
"compilerPath": "C:/Qt/Tools/mingw810_64/bin/g++.exe",
"cStandard": "c17",
"cppStandard": "c++17",
"intelliSenseMode": "gcc-x64",
}
],
"version": 4
}
And so here is the simple program I am trying to compile for now:
#include <iostream>
#include <QtGui>
using namespace std;
int main(int argc, char *argv[])
{
QApplication app(argc, argv);
QWidget window;
window.resize(320, 240);
window.show();
window.setWindowTitle(
QApplication::translate("toplevel", "Top-level widget"));
return app.exec();
}
Unfortunately, it seems that VS Code can't find the QtGui library and so I can't even compile my application
I thank you for your help !