Forum Discussion

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

undefined reference to getc error

Hi,

I am new to nios processor. when I use getchar function in my programm, I am getting error "undefined reference to `getc'".My task is very simple.I need to read a charecter from console and compare that charecter,if it is "w" I have to send data to pio ( again from console and it is just 8 bit pio). If it is "r" I have to read data from PIO (I am lucky, atleast printf is working ).Can anybody tell me what is wrong with getchar function ? and any suggestions to impliment my task.

Sarat

3 Replies