Quantcast
Channel: Active questions tagged lm - Stack Overflow
Viewing all articles
Browse latest Browse all 105

how to fix clang: error: -lm: 'linker' input unused [-Werror,-Wunused-command-line-argument]? [duplicate]

$
0
0

I downloaded homebrew, gcc14 and pasted the path on compiler.

Then it worked when I pasted the flags:

 -DCMAKE_C_FLAGS="-Wall -Werror -pedantic-errors -lm -g"

But it didn’t build and showed:

FAILED: CMakeFiles/HW0.dir/main.c.o/usr/bin/gcc   -Wall -Werror -lm -pedantic-errors -g -g -std=gnu99 -isysroot /Library/Developer/CommandLineTools/SDKs/MacOSX11.3.sdk -fcolor-diagnostics -MD -MT CMakeFiles/HW0.dir/main.c.o -MF CMakeFiles/HW0.dir/main.c.o.d -o CMakeFiles/HW0.dir/main.c.o -c /Users/noharbatit/CLionProjects/HW0/main.cclang: error: -lm: 'linker' input unused \[-Werror,-Wunused-command-line-argument\]ninja: build stopped: subcommand failed.

I have MacBook intel chip with macOS 15 sequoiahelp please

I tried to redownload clionhomebrewreinstall Xcodepaste path directly.

but it seems nothing is working


Viewing all articles
Browse latest Browse all 105

Trending Articles



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