vscode-cpptools
vscode-cpptools copied to clipboard
/usr/bin/ld: /tmp/ccIxVWk8.o: in function `main': new.c:(.text+0x2e): undefined reference to `sqrt' collect2: error: ld returned 1 exit status
I use codeoss on linux and i know that in linux you have to add "-lm" tag to include math.h library but i don't wanna do it manually, i use vscode to prevent myself from doing repetitive stuff, so the problem is [Running] cd "/home/redacted/codeoss/" && gcc new.c -o new && "/home/redacted/codeoss/"new this code, it doesn't automatically adds "-lm" tag, I'm using these 2 extensions "formulahendry.code-runner" "ms-vscode.cpptools".
We're tracking this issue with https://github.com/microsoft/vscode-cpptools/issues/6174 .