dlopen is located in libdl.a but when I link my application against libdl.a , gcc linker throw this error : unknow reference to __dlopen called in dlopen
Should I import another .a?
Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.
Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.
Lost your password? Please enter your email address. You will receive a link and will create a new password via email.
Please briefly explain why you feel this question should be reported.
Please briefly explain why you feel this answer should be reported.
Please briefly explain why you feel this user should be reported.
When I try to compile statically a
dlopenmockup program,gcc(Archlinux/gcc version 4.6.1 20110819 (prerelease)) tells me:and indeed, when I ran this script in
/usr/lib/I saw:
so as per the first line,
libc.adoes define your missing symbole.In my system,
gcc test.c -ldl -staticis enough to make the application run, butshould fix the problem in your system.