Intel® FPGA University Program
University Program Material, Education Boards, and Laboratory Exercises
Announcements
Intel Support hours are Monday-Fridays, 8am-5pm PST, except Holidays. Thanks to our community members who provide support during our down time or before we get to your questions. We appreciate you!

Need Forum Guidance? Click here
Search our FPGA Knowledge Articles here.
1049 Discussions

math library in Intel Monitor Program

ruth
Beginner
316 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
277 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

BoonBengT_Intel
Moderator
266 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

BoonBengT_Intel
Moderator
239 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

Reply