im migrating a project from netbeans to VScode and now i need to configure the compiler for everything manually, but i ran into 2 issues
1) for some reason when i use g++ on the terminal it works, with errors from the program but it works, but if i try running the task.json from Vscode itself it wont show me anything and just stay on "Initiaded Task" unless i close the terminal
2) and even when i configure the c_cpp_properties.json with all the includes paths, intellisense keeps saying me it cant find the file, either from my header inside a folder or the Qt header files.
im pasting both json files here, meabe im missing something
c_cpp_properties.json
{
"configurations": [
{
"name": "Mingw64 Qt5.11",
"includePath": [
"C:/Qt/Qt5.11.3/5.11.3/mingw53_32/include",
"C:/Qt/Qt5.11.3/5.11.3/mingw53_32/include/QtCore",
"C:/Qt/Qt5.11.3/5.11.3/mingw53_32/include/QtGui",
"C:/Qt/Qt5.11.3/5.11.3/mingw53_32/include/QtWidgets",
"C:/Qt/Qt5.11.3/5.11.3/mingw53_32/include/QtSql",
"C:/Qt/Qt5.11.3/5.11.3/mingw53_32/include/QtSerialPort",
"C:/Qt/Qt5.11.3/5.11.3/mingw53_32/include/QtPrintSupport",
"C:/Qt/Qt5.11.3/5.11.3/mingw53_32/include/QtNetwork",
"C:/Qt/Qt5.11.3/5.11.3/mingw53_32/include/QtConcurrent",
"C:/Users/Patron/Desktop/Code Projects/Sistema_Silo/Headers",
"C:/Users/Patron/Desktop/Code Projects/Sistema_Silo/Cpp",
"C:/Users/Patron/Desktop/Code Projects/Sistema_Silo",
"${workspaceFolder}"
],
"defines": [
"_DEBUG",
"UNICODE",
"_UNICODE"
],
"compilerPath": "C:/Qt/Qt5.11.3/Tools/mingw530_32/bin/g++.exe",
"cStandard": "gnu17",
"cppStandard": "c++14",
"intelliSenseMode": "windows-gcc-x86",
"browse": {
"path": [
"C:/Qt/Qt5.11.3/5.11.3/mingw53_32/include",
"C:/Qt/Qt5.11.3/5.11.3/mingw53_32/include/QtCore",
"C:/Qt/Qt5.11.3/5.11.3/mingw53_32/include/QtGui",
"C:/Qt/Qt5.11.3/5.11.3/mingw53_32/include/QtWidgets",
"C:/Qt/Qt5.11.3/5.11.3/mingw53_32/include/QtSql",
"C:/Qt/Qt5.11.3/5.11.3/mingw53_32/include/QtSerialPort",
"C:/Qt/Qt5.11.3/5.11.3/mingw53_32/include/QtPrintSupport",
"C:/Qt/Qt5.11.3/5.11.3/mingw53_32/include/QtNetwork",
"C:/Qt/Qt5.11.3/5.11.3/mingw53_32/include/QtConcurrent",
"C:/Users/Patron/Desktop/Code Projects/Sistema_Silo/Headers",
"C:/Users/Patron/Desktop/Code Projects/Sistema_Silo/Cpp",
"C:/Users/Patron/Desktop/Code Projects/Sistema_Silo"
]
},
"compileCommands": "${workspaceFolder}/build/compile_commands.json",
"configurationProvider": "ms-vscode.cmake-tools"
}
],
"version": 4
}
Task.json
{
// See https://go.microsoft.com/fwlink/?LinkId=733558
// https://stackoverflow.com/questions/30064686/making-and-compiling-c-projects-with-multiple-files
// for the documentation about the tasks.json format
// https://www.softwaretestinghelp.com/cpp-makefile-tutorial/
"version": "2.0.0",
"tasks": [
{
"type": "cppbuild",
"label": "g++ compilar Silo SaS",
"command": "C:\\Qt\\Qt5.11.3\\Tools\\mingw530_32\\bin\\g++.exe",
"args": [
//"--verbose",
"-std=c++14",
"-Wall",
//"-c",
//"-g", // debuging mode
//"-o", // output name
// "${fileDirname}
// hay que incluir todas las direcciones de Qt, y tambien los *.h
//"${fileDirname}",
//"-I C:/Users/Patron/Desktop/Code Projects/Sistema_Silo",
"-I C:/Qt/Qt5.11.3/5.11.3/mingw53_32/include",
// "-LC:/Qt/Qt5.11.3/5.11.3/mingw53_32/lib",
"-I C:/Qt/Qt5.11.3/5.11.3/mingw53_32/include/QtCore",
"-I C:/Qt/Qt5.11.3/5.11.3/mingw53_32/include/QtSql",
"-I C:/Qt/Qt5.11.3/5.11.3/mingw53_32/include/QtWidgets",
"-I C:/Qt/Qt5.11.3/5.11.3/mingw53_32/include/QtPrintSupport",
"-I C:/Qt/Qt5.11.3/5.11.3/mingw53_32/include/QtNetwork",
"-I C:/Qt/Qt5.11.3/5.11.3/mingw53_32/include/QtGui",
"-I C:/Qt/Qt5.11.3/5.11.3/mingw53_32/include/QtConcurrent",
// aqui van los cpp
//"*.cpp",
"Cpp/Silo_SaS.cpp",
"Cpp/main_Pantalla_Principal.cpp",
"Cpp/Generales.cpp",
"Cpp/Impresora.cpp",
"Cpp/Launcher.cpp",
"Cpp/Login.cpp",
"Cpp/Serial.cpp",
"Cpp/Servidor_Rpi.cpp",
"-o",
"dist/Debug/Vscode_Windows/Sistema_Silo_Windows_VScode_1_4.exe",
// g++ -std=c++14 -Wall -I C:/Qt/Qt5.11.3/5.11.3/mingw53_32/include -I C:/Qt/Qt5.11.3/5.11.3/mingw53_32/include/QtCore -I C:\Qt\Qt5.11.3\5.11.3\mingw53_32\include\QtSql -I C:\Qt\Qt5.11.3\5.11.3\mingw53_32\include\QtWidgets -I C:\Qt\Qt5.11.3\5.11.3\mingw53_32\include\QtPrintSupport -I C:\Qt\Qt5.11.3\5.11.3\mingw53_32\include\QtNetwork -I C:\Qt\Qt5.11.3\5.11.3\mingw53_32\include\QtGui -I C:\Qt\Qt5.11.3\5.11.3\mingw53_32\include\QtConcurrent "C:\Users\Patron\Desktop\Code Projects\Sistema_Silo\Cpp\Silo_SaS.cpp" "C:\Users\Patron\Desktop\Code Projects\Sistema_Silo\Cpp\main_Pantalla_Principal.cpp" "C:\Users\Patron\Desktop\Code Projects\Sistema_Silo\Cpp\Generales.cpp" "C:\Users\Patron\Desktop\Code Projects\Sistema_Silo\Cpp\Impresora.cpp" "C:\Users\Patron\Desktop\Code Projects\Sistema_Silo\Cpp\Launcher.cpp" "C:\Users\Patron\Desktop\Code Projects\Sistema_Silo\Cpp\Login.cpp" "C:\Users\Patron\Desktop\Code Projects\Sistema_Silo\Cpp\Serial.cpp" "C:\Users\Patron\Desktop\Code Projects\Sistema_Silo\Cpp\Servidor_Rpi.cpp" -o /dist/Debug/Vscode_Windows/Sistema_Silo_Windows_VScode_1_4.exe
],
"options": {
"cwd": "${workspaceFolder}"
},
"problemMatcher": [
"$gcc"
],
"group": {
"kind": "build",
"isDefault": true
},
"detail": "compilador: C:/Qt/Qt5.11.3/Tools/mingw530_32/bin/g++.exe"
}
]
}