??????????????????4
???????????? ???????[ 2013/8/7 13:26:40 ] ????????
?????:??????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)?????????????????????????????????????????鶼?????????????????????£???????????????δ?????????????????”??“??
??????
???·???
??????????????????
2023/3/23 14:23:39???д?ò??????????
2023/3/22 16:17:39????????????????????Щ??
2022/6/14 16:14:27??????????????????????????
2021/10/18 15:37:44???????????????
2021/9/17 15:19:29???·???????·
2021/9/14 15:42:25?????????????
2021/5/28 17:25:47??????APP??????????
2021/5/8 17:01:11