undefined reference error while using 'gets'
Rohit Arul Raj
Thu Nov 3 14:28:00 GMT 2011
I am using newlib v1.18 built with 'powerpc-elf' v4.5.2. While using
the 'gets' function call, i get the following error:
gets.c:(.text+0x30): undefined reference to `__sfp_lock_acquire'
gets.c:(.text+0xa8): undefined reference to `__sfp_lock_release'
Based on the documentation, it has been mentioned that 'gets' is
obsolete and we need to use 'fgets'. But still i should not be getting
any undefined reference errors.
I took a look at the 'newlib\libc\stdio\gets.c' and i think we need to
include "local.h" to get these definitions. Is that right?
Let me know your suggestions.
More information about the Newlib