?????:??????dlopen??dlsym??dlclose????????????ù???

????????????:cc-o testlibdl testlibdl.c -ldl

???????./testlibdl???

????/lib/i386-linux-gnu/libc.so.6:undefined symbol: Apply

????????????????£??????????libdl??????????г????????????????????·??????????????????????????????/lib??/usr/lib??Щ???£?????????????????????????2??3С?????????????????????Makefile???(??????800???е?Makefile??????????????????)

???????????????????????ο?[5]?з??????????“??????????desktop-i386?汾??make????????dlopen??dlclose??????????.??????????????????????-ldl???????λ?ò????λ????÷????????????????????????-lm.?????????????????????潫Makefle?е?-lm?????????-ldl?????make????????”

???????????????????-ldl?????λ??????????-lm?????????????????б??????????Makefile??LIBS=-lm????????????-ldl???????????£?????????????-ldl???????????make??????

?????? sudo make install????cppunit?????/usr/local/lib?С??????????????? ls /usr/local/lib/ |grep libcppunit ???????????????????????????????????????Щ??.

libcppunit-1.12.so.1
libcppunit-1.12.so.1.0.0
libcppunit.a
libcppunit.la
libcppunit.so

??????????????з???libldl.so?????????????????????

    Ps:

Interface Libraries
NAME
libdl - dynamic linking library
SYNOPSIS
cc [ flag... ] file... -ldl [ library... ]
DESCRIPTION
Historically??  functions in libdl provided for dynamic linking support.
This functionality now resides in libc(3LIB).
This library is maintained to provide backward compatibility  for  both
runtime  and compilation environments. The shared object is implemented
as a filter on the runtime  linker.  See  ld.so.1(1).  New  application
development need not specify -ldl.
INTERFACES
The  shared object libdl.so.1 provides the following public interfaces.
See Intro(3) for additional information on shared object interfaces.
dladdr                        dladdr1
dlclose                       dldump
dlerror                       dlinfo
dlmopen                       dlopen
dlsym

????6 .С??

????a)??Щ???????????????????????????????????????????????????????????????

????b)?????????????????????????????????????????鶼?????????????????????£???????????????δ?????????????????”??“??