vscode-cpptools icon indicating copy to clipboard operation
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

Open W1F3B34T3R opened this issue 6 years ago • 1 comments

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".

W1F3B34T3R avatar Sep 29 '20 12:09 W1F3B34T3R

We're tracking this issue with https://github.com/microsoft/vscode-cpptools/issues/6174 .

sean-mcmanus avatar Sep 29 '20 17:09 sean-mcmanus