Undefined reference to dlsym

When I do a “make” for asterisk installation, I’m getting this undefined reference to “dlsym” error. I don’t know how to fix this, googled but no good solution.

when I tried to build asterisk 1.4, I get

[quote]/usr/src/asterisk/main/editline/readline.c:1294: warning: Using ‘setpwent’ in statically linked applications requires at runtime the shared libraries from the glibc version used for linking
/usr/src/asterisk/main/editline/readline.c:1300: warning: Using ‘endpwent’ in statically linked applications requires at runtime the shared libraries from the glibc version used for linking
utils.o: In function ast_gethostbyname': /usr/src/asterisk/main/utils.c:223: warning: Using 'gethostbyname_r' in statically linked applications requires at runtime the shared libraries from the glibc version used for linking manager.o: In functionaccept_thread’:
/usr/src/asterisk/main/manager.c:2406: warning: Using ‘getprotobyname’ in statically linked applications requires at runtime the shared libraries from the glibc version used for linking
/usr/lib/gcc/i486-linux-gnu/4.2.3/…/…/…/…/lib/libcrypto.a(dso_dlfcn.o): In function dlfcn_bind_func': (.text+0x2d6): undefined reference todlsym’
/usr/lib/gcc/i486-linux-gnu/4.2.3/…/…/…/…/lib/libcrypto.a(dso_dlfcn.o): In function dlfcn_bind_var': (.text+0x446): undefined reference todlsym’
collect2: ld returned 1 exit status
make[1]: *** [asterisk] Error 1
make: *** [main] Error 2
[/quote]
help me out