I am using a set up with following versions:
- RHEL 9.2
- G++ 11.4.1
- GCC 11.4.1
- VSCode 1.86.2
I am trying to compile a C++ project but I am getting the error:
/usr/bin/g++ -g -std=c++20 '/home/cg/Desktop/cppproject/43IntegerTypes/*.cpp' -o /home/cg/Desktop/cppproject/43IntegerTypes/rooster
cc1plus: fatal error: /home/cg/Desktop/cppproject/43IntegerTypes/*.cpp: No such file or directory
compilation terminated.
My tasks.json file looks like the following:
{
"version": "2.0.0",
"tasks": [
{
"type": "cppbuild",
"label": "build with GCC",
"command": "/usr/bin/g++",
"args": [
"-g",
"-std=c++20",
"${workspaceFolder}/*.cpp",
"-o",
"${workspaceFolder}/rooster"
],
"options": {
"cwd": "${fileDirname}"
},
"problemMatcher": [
"$gcc"
],
"group": "build",
"detail": "compiler: /usr/bin/g++"
}
]
}
if I change the line from "${workspaceFolder}/*.cpp" to "${workspaceFolder}/main.cpp", then the program is compiled without errors.
Is there any issue with my setup and the wildcard?