missing libraries under Kubuntu 12.04, 64 bit

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



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.



[Index of Archives]     [Linux C Programming]     [Linux Kernel]     [eCos]     [Fedora Development]     [Fedora Announce]     [Autoconf]     [The DWARVES Debugging Tools]     [Yosemite Campsites]     [Yosemite News]     [Linux GCC]

  Powered by Linux