Hi, I would like to know how to include the math.h library in a simple c program to be played in the DE1-SoC computer based in Nios II (I need the sin function to create a musical note)
According to the laboratory exercise 8 of emmbedded systems, I have to add -lm at the additional compiler flag but I get the error:
"undefined reference to sin.."
what make me suspect that the math library is not being included in the program
what can I do?
Thank you for posting in Intel community forum, hope this message find you well and apologies for the delayed in response.
On the challenge to perform a sin function for c program, you may refer to the following sample code here.
Basically it is just to include the math.h library to your code.
Please do let us know if that helps to clarify your situation.
Hope this message find you well and good day, unfortunately as we do not receive any response from you to the previous clarification that we have provided. Please post a response in the next 15 days to allow me to continue to support you. After 15 days, this thread will be transitioned to community support. The community users will be able to help you with your follow-up questions.