unable to compile math library in c | undefined reference to `sqrt` #vscode #shorts #clanguage

preview_player
Показать описание
In C programming, the math library provides mathematical functions that can be used in programs. However, this library is not linked by default. To link it, we need to add the "-lm" flag while compiling the program. The "-lm" flag instructs the compiler to link the math library with the program, enabling us to use the math functions. Not adding this flag could lead to undefined reference errors, making it essential to add it while compiling to ensure the program runs correctly.
Рекомендации по теме
Комментарии
Автор

What i have to add -lm I'm not able to understand plz help me

raihan