This is the mail archive of the newlib@sourceware.org mailing list for the newlib project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

undefined reference error while using 'gets'


Hi All,

I am using newlib v1.18 built with 'powerpc-elf' v4.5.2. While using
the 'gets' function call, i get the following error:

powerpc-elf/4.5.2/../../../../powerpc-elf/lib\libc.a(lib_a-gets.o): In
function `_gets_r':
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.

Thanks,
Rohit


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]