Intel® FPGA University Program
University Program Material, Education Boards, and Laboratory Exercises
1174 Discussions

math library in Intel Monitor Program

ruth
Beginner
881 Views

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

 

0 Kudos
3 Replies
BoonBengT_Intel
Moderator
842 Views

Hi @ruth,

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.

Warm regards.
BB

0 Kudos
BoonBengT_Intel
Moderator
831 Views

Hi @ruth,

Greeting, any chances did you managed to get the math function working?

Please do let us know if there is any further clarification.

 

Warm regards

BB

0 Kudos
BoonBengT_Intel
Moderator
804 Views

Hi @ruth,

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. 
 
Warm Regards
BB

0 Kudos
Reply