Quantcast
Channel: Active questions tagged gcc - Stack Overflow
Viewing all articles
Browse latest Browse all 22031

How to pass comma-separated options to the g++ linker with VSCode?

$
0
0

I need to pass the arg -Wl,-Bstatic,--whole-archive to g++.

"version": "2.0.0","tasks": [        {"type": "shell","label": "shell: g++.exe build active file","command": "C:\\MinGW\\x86\\bin\\g++.exe","args": ["-g","${file}","-Wl,-Bstatic,--whole-archive","-Xlinker","-Map=${fileDirname}\\${fileBasenameNoExtension}.map","-o","${fileDirname}\\${fileBasenameNoExtension}.exe"            ],"options": {"cwd": "C:\\MinGW\\x86\\bin"            },"problemMatcher": ["$gcc"            ],"group": "build"        }    ]}

It gives me in output this in the terminal.

Executing task: C:\MinGW\x86\bin\g++.exe -g 'c:\Users\remi\Desktop\OK - VSCode\loaderstack.cpp' -Wl,-Bstatic,--whole-archive -Xlinker '-Map=c:\Users\remi\Desktop\OK - VSCode\loaderstack.map' -o 'c:\Users\remi\Desktop\OK - VSCode\loaderstack.exe'<    At line:1 char:84+ ... e -g 'c:\Users\remi\Desktop\OK - VSCode\loaderstack.cpp' -Wl,-Bstatic ...+                                                                 ~    Missing argument in parameter list.    At line:1 char:93+ ... Users\remi\Desktop\OK - VSCode\loaderstack.cpp' -Wl,-Bstatic,--whole- ...+                                                                 ~    Missing argument in parameter list.+ CategoryInfo          : ParserError: (:) [], ParentContainsErrorRecordException+ FullyQualifiedErrorId : MissingArgument

Is there anyway to build inside VSCode with these comma-separated args ?


Viewing all articles
Browse latest Browse all 22031

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>