What do you want to save?
Add Code snippet
New code examples
-
C 2022-03-15 07:20:11
undefined reference to `sqrt'
The math library must be linked in when building the executable. How to do this varies by environment, but in Linux/Unix, just add -lm to the command: gcc test.c -o test -lm The math library is named libm.so, and the -l command option assumes a lib pref... Add solution
Best helpers
Billfranke
+5
Test2
+5
Eimhin Walsh
+5
Jeff H.
+5
Rio1210
+5
H. Flou
+5
Reg
+5
Monkey.Luffy
+5
Pavol
+5
SRM
+5
Lx550
+5
Nostradamus
+5
Dfm
+5
Whippoorwill
+5
Deduplicator
+5