Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

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.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • SEARCH
  • Home
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 6607285
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 25, 20262026-05-25T19:29:14+00:00 2026-05-25T19:29:14+00:00

dlopen is located in libdl.a but when I link my application against libdl.a ,

  • 0

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?

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-05-25T19:29:14+00:00Added an answer on May 25, 2026 at 7:29 pm

    When I try to compile statically a dlopen mockup program, gcc (Archlinux/gcc version 4.6.1 20110819 (prerelease)) tells me:

    $ gcc test.c  -ldl -static  
    /tmp/ccsWe4RN.o: In function `main': test.c:(.text+0x13): 
    warning: Using 'dlopen' in statically linked applications requires 
    at runtime the shared libraries from the glibc version used for linking
    

    and indeed, when I ran this script in /usr/lib/

    for i in *.a; 
    do 
        echo $i; 
        readelf -a $i | grep __dlopen;
    done
    

    I saw:

    libc.a
    16: 0000000000000080    69 FUNC    GLOBAL DEFAULT    1 __dlopen
    000000000000  002300000001 R_X86_64_64       0000000000000000 __dlopen + 0
    35: 0000000000000000     0 NOTYPE  GLOBAL DEFAULT  UND __dlopen
    

    so as per the first line, libc.a does define your missing symbole.

    In my system, gcc test.c -ldl -static is enough to make the application run, but

    gcc <file> -static -ldl -lc
    

    should fix the problem in your system.

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I get this error when I try to import ssrc.spread : ImportError: dlopen(/Library/Frameworks/Python.framework/Versions/2.6/lib/python2.6/site-packages/ssrc/_spread.so, 2):
I get this error while loading a lib with dlopen() : Cannot dlopen load
I am trying to load a dynamic library using dlopen function. This library contains
I have a problem with a C++ application I've developed which uses dlopen to
My application processes thousands of messages and uses dlopen / dlclose etc to call
My application dynamically loads liba.so (with dlopen ). liba.so uses libb.so so I want
I'm using dlopen() in an Apache module that I am writing so that I
When loaded a shared library is opened via the function dlopen() , is there
Does anyone know why a library initialized within dlopen() would initialize a static variable
For instance: void* sdl_library = dlopen(libSDL.so, RTLD_LAZY); void* initializer = dlsym(sdl_library,SDL_Init); Assuming no errors,

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.