public inbox for gcc-help@gcc.gnu.org
 help / color / mirror / Atom feed
* missing libraries under Kubuntu 12.04, 64 bit
@ 2012-06-02 19:10 geezers
  2012-06-02 19:19 ` Marc Glisse
  0 siblings, 1 reply; 8+ messages in thread
From: geezers @ 2012-06-02 19:10 UTC (permalink / raw)
  To: gcc-help


Trying to compile and link some programs I wrote many years ago and have been
using often. I last compiled under Kubuntu version 10 and decided to update
and compile new features.

Using the same make file that worked for years, but getting linker errors
for unresolved externals. The compilation gives me warnings about needing a
format string for fprintf, but that is because the format string used has no
'%' specifiers (I assume that is the reason it doesn't like the format
string) and about ignoring function return values. I was going to fix those
but decided to leave as is. Other than the warning messages, the compilation
gives no errors.

The relevant make file line is:

$(CC) -o $@ -ldl -rdynamic $(OBJS)

CC is defined simply as gcc and OBJS is the list of object files.

The linker error messages are:

home$ make
linking
gcc -o qtgrep.bin -ldl -rdynamic buffer.o displayu.o findfile.o getopt.o
grepdfa.o date.o re_compile.o re_exec.o re_read.o re_write.o kw_compile.o
kw_exec.o kw_read.o kw_write.o scan.o set_expr.o read_pat_file.o free_pat.o
write_pat_file.o memory_fun.o
set_expr.o: In function `QTGrep_load_compiled_searches':
/home/terry/Source/QTGrep_Multiple/set_expr.c:2036: undefined reference to
`dlclose'
/home/terry/Source/QTGrep_Multiple/set_expr.c:2042: undefined reference to
`dlerror'
/home/terry/Source/QTGrep_Multiple/set_expr.c:2045: undefined reference to
`dlopen'
/home/terry/Source/QTGrep_Multiple/set_expr.c:2047: undefined reference to
`dlerror'
/home/terry/Source/QTGrep_Multiple/set_expr.c:2052: undefined reference to
`dlsym'
/home/terry/Source/QTGrep_Multiple/set_expr.c:2053: undefined reference to
`dlerror'
/home/terry/Source/QTGrep_Multiple/set_expr.c:2067: undefined reference to
`dlerror'
collect2: ld returned 1 exit status
make: *** [qtgrep.bin] Error 1
 
I used locate and got:

home$ locate libdl.
/dos/Vista/cygwin/lib/libdl.a
/lib/i386-linux-gnu/libdl.so.2
/lib/x86_64-linux-gnu/libdl.so.2
/lib32/libdl.so.2
/usr/lib/x86_64-linux-gnu/libdl.a
/usr/lib/x86_64-linux-gnu/libdl.so


I created links in /lib as: 
/lib/libdl.a to /usr/lib/x86_64-linux-gnu/libdl.a 
and 
/lib/libdl.so to/usr/lib/x86_64-linux-gnu/libdl.so

hoping that would solve the problem. No Joy.

So I decided that is was time to ask the experts and found this mailing
list. The answer is probably simple to those in the know, but I ran out of
things to try for now. Will keep trying, but thought it quicker to ask.

Thanks for your help on this.
-- 
View this message in context: http://old.nabble.com/missing-libraries-under-Kubuntu-12.04%2C-64-bit-tp33950674p33950674.html
Sent from the gcc - Help mailing list archive at Nabble.com.

^ permalink raw reply	[flat|nested] 8+ messages in thread

end of thread, other threads:[~2012-06-04 23:26 UTC | newest]

Thread overview: 8+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2012-06-02 19:10 missing libraries under Kubuntu 12.04, 64 bit geezers
2012-06-02 19:19 ` Marc Glisse
2012-06-02 21:29   ` geezers
2012-06-04  5:46     ` Ian Lance Taylor
2012-06-04 17:02       ` geezers
2012-06-04 18:07         ` Ian Lance Taylor
2012-06-04 18:28           ` geezers
2012-06-04 23:26             ` Ian Lance Taylor

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).