Forum Discussion

Altera_Forum's avatar
Altera_Forum
Icon for Honored Contributor rankHonored Contributor
11 years ago

Nios II Eclipse "undefined reference to"

Hi all,

I've just downloaded Quartus 13Sp1. I'm having a 3 day issue with eclipse and I was hoping the support pack may have provided the solution, unfortunately it did not! The problem is when i compile my project in Eclipse I get the following error.

https://www.alteraforum.com/forum/attachment.php?attachmentid=8605

I've searched high and low, tried the linker fix where I added -lm to 'project'\niosII application properties\Linker flags - perhaps I'm doing it wrong.

I've examined my code, it compiles when I do not include [ //xxxx ] the lines of code causing the error.

I appreciate this may be a stupid question to the more experienced members, but I'm at my wits end with it.

Eclipse is quirky so I'm always sure to, save all changes. Then regenerate/clean build and finally build the bsp.

And again, clean build and build the project.

If I go project properties/C/C++ General/Paths and Symbols - the included directories are shown below

https://www.alteraforum.com/forum/attachment.php?attachmentid=8606

The next tab Symbols is populated. A possible issue may be the Libaries and Library Paths tabs are both empty.

Source Location conatain folder /'project'

The code itself: I have my main.c program and included two header files. The functions causing the issue is contained in a header file. The main.c has include"xxxxx.h" for both header files but I keep getting the errors.

The following article seems to be well on the buck but no joy again http://stackoverflow.com/questions/5005363/undefined-reference-to-sin-in-c

Perhaps I'm overlooking or doing something wrong, any help or tips would be much appreciated.

Cian

3 Replies