polarfire-soc / polarfire-soc-documentation

PolarFire SoC Documentation
Other
37 stars 19 forks source link

using math function like tan, cos, sin #221

Closed henryding-emcore closed 1 year ago

henryding-emcore commented 1 year ago

I’m using math function like tan, cos, sin in one of my .c files. I have included in the file but still got error: undefined reference to tan' undefined reference tocos'

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 But I’m using Softconsole GUI. How do I fix this problem?