Skip to content

[BUG]: Compiler ARGS not taken over/considered when running build with g++ on Win10 #6366

@hasenradball

Description

@hasenradball
  • VSCode Version: 150.1
  • OS Version: Win 10.0.18363
  • c/c++: v1.1.0-insiders2

General Information

When compiling a simple c++ programm like "hello world" or just want to compile 2 or 3 files and link them together by adapting the tasks.json file, every change in the file works until the args part.
I you change the **args**like change the output filename or using *.cpp instead of ${file}.
The compiler only uses the active file and nothing else!

Steps to Reproduce:

  1. create the "hello world" example from Documentation
  2. change the compiler "args" in tasks.json like an other output name, or change the args to be able to compile multiple files
  3. run Task
  4. the changes in "args" are not considered!

Hint:

On MAC and Linux there is no problem, it works fine.
On Win10 it does not work!

{ "version": "2.0.0", "tasks": [ { "type": "cppbuild", "label": "C/C++: g++.exe build active file", "command": "C:\Program Files (x86)\mingw-w64\i686-8.1.0-posix-dwarf-rt_v6-rev0\mingw32\bin\g++.exe", "args": ["-g", "${workspaceFolder}\*.cpp", "-o", "${fileDirname}\${fileBasenameNoExtension}.exe"], "options": { "cwd": "${workspaceFolder}" }, "problemMatcher": [ "$gcc" ], "group": { "kind": "build", "isDefault": true }, "detail": "compiler: "C:\Program Files (x86)\mingw-w64\i686-8.1.0-posix-dwarf-rt_v6-rev0\mingw32\bin\g++.exe"" } ] }

Does this issue occur when all extensions are disabled?:
actually not possible to tes

Metadata

Metadata

Assignees

Labels

bugfixedCheck the Milestone for the release in which the fix is or will be available.regressionA bug that didn't exist in a previous releasetasks/build/debugAn issue relating to tasks.json (e.g. build issues)

Type

No type

Projects

No projects

Milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions