- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Hi all. I'm trying to use a sin() function. I've #included both math.h and stdlib.h, but my code won't build:
"main.c:37: undefined reference to `sin' "
I say won't build, because if I issue a complie command on the main.c code alone, it works just fine. What gives?
P.S. Yes, I know the argument and resultant are both doubles, that's not the problem.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
BTW If it matters, I'm using a PSoC 5 in the form of a Cy8kit050 dev board.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
It gets even more weird...I found that if I manually type in an argument to sin, the compiler takes it, but if I even so much as assign the same number to another double variable, the compiler (ARM gcc 4.4.1) gets angry.
E.g.:
foo = sin(1.234567); => Compiler happy
************************************************
doo = 1.234567;
foo = sin(doo); => Compiler unhappy!
***********************************************
What is up with this?
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Yes, this should be outlined better, I have suffered from the same error until someone else helped me out. have a look at this http://www.cypress.com/?id=4&rID=42838 and follow the instructions
Bob
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Bob, I'd buy you a beer if you weren't 3,000 miles away in Der Deutschland. Danke Schoen!!!!!
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Got you!!!
I am currently in Silicon Valley having visited Cypress. Where are you, where's my beer??? (very broad smile)
Bob
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Bob: if you ever visit the Cleveland area, your beer is on me. We in the Midwest have a lot of really good microbreweries. Enjoy sunny Norcal. If you get a chance, visit one of the open space areas to the West of Sunnyvale/SJ. I recommend Pichetti Ranch. It's some beautiful country!
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Thank you bob
As you said cypress should have outlined this well.even cypress should improve it's search algorithm
I had tried to find on this issue on cypress search but all effort went viens.
This post is pointed out by google.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Thanks!