using math function like tan, cos, sin #222
-
I’m using math function like tan, cos, sin in one of my .c files. I have included <math.h> in the file but still got error: I searched online and most of suggestions are to add -lm in the end of gcc command. Something like: gcc -pedantic -Wall -o theaded_program pth.c -pthread -lm |
Beta Was this translation helpful? Give feedback.
Replies: 1 comment 1 reply
-
looks like adding -lm to the libs via linker settings would sort this out in your SoftConsole based project. |
Beta Was this translation helpful? Give feedback.
looks like adding -lm to the libs via linker settings would sort this out in your SoftConsole based project.
In particular Project -> C/C++ Build -> Settings -> Cross Linker -> Libraries -> Add and just add m