Results 1 to 3 of 3
hi guys
i am new to linux forums !!!
i was trying to compile a small c program which uses the readline library in mandriva but its giving me all ...
- 05-05-2008 #1Just Joined!
- Join Date
- May 2008
- Posts
- 1
hi guys...programming problem
hi guys
i am new to linux forums !!!
i was trying to compile a small c program which uses the readline library in mandriva but its giving me all sorts of errors
gcc filename
or gcc filename -lreadline
errors :-
usr/local/lib/libreadline.so: undefined reference to `PC'
/usr/local/lib/libreadline.so: undefined reference to `tgetflag'
/usr/local/lib/libreadline.so: undefined reference to `tgetent'
/usr/local/lib/libreadline.so: undefined reference to `UP'
/usr/local/lib/libreadline.so: undefined reference to `tputs'
/usr/local/lib/libreadline.so: undefined reference to `tgoto'
/usr/local/lib/libreadline.so: undefined reference to `tgetnum'
/usr/local/lib/libreadline.so: undefined reference to `BC'
/usr/local/lib/libreadline.so: undefined reference to `tgetstr'
collect2: ld returned 1 exit status
any help ?
- 05-05-2008 #2Just Joined!
- Join Date
- Mar 2008
- Posts
- 23
hi
1.can u post ur small c program as well? they might be some error inside.and can give us some clue of what s wrong
2. Can u check if g++ is installed? use this command "g++ -v "
to find it out. gcc may fail link to most of c libraries if g++ is not there.
Good luck
- 05-05-2008 #3
So the issue here seems to be that you're not linking in the correct library. Interestingly, the link errors are coming from libreadline.so, so it appears that you need to link a second library as well (one on which libreadline depends). I don't know what this library might be, but if you can find some tutorial on using readline, it may have an example.
DISTRO=Arch
Registered Linux User #388732


Reply With Quote