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 8675031
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 12, 20262026-06-12T19:51:00+00:00 2026-06-12T19:51:00+00:00

The problem is I use dlopen to load a library (the .so is written

  • 0

The problem is I use dlopen to load a library (the .so is written by me, it’s not a system library), but I got the error shown in the title.

  1. I have included dlfcn.h
  2. in compiler, I used the -ldl command
  3. What I want to load is just the source code folder, I tried to add -L., but it did not work.
  • 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-06-12T19:51:01+00:00Added an answer on June 12, 2026 at 7:51 pm

    If the library you want to dlopen is not in the standard search path you have a number of options:

    1. Specify the full path to the file in dlopen

      dlopen("/full/path/to/libfile.so");

    2. Add the path to the library via LD_LIBRARY_PATH

      LD_LIBRARY_PATH=/path/to/library/ ./executable

    3. use the ld -rpath option to add a library path to the application.

      g++ -link stuff- -Wl,-rpath=/path/to/library/

    Note that options 1 & 3 hardcode the library path into your application. -rpath does have an option to specify a relative path, i.e.

    -Wl,-rpath=$ORIGIN/../lib/
    

    Will embed a relative path into the application.

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

Sidebar

Related Questions

i have problem use link_to_remote link_to_remote document example say link_to_remote Delete this post, :update
I'm new in codeigniter I have problem I use my OS X Lion, and
I have assignment to work on producer and consumer problem by use thread and
I have quite a problem concerning the use of relational database concepts in Delphi
i am having this problem try to use the cocos2d CCScrollLayer I have added
I have compiled FFmpeg library using NDK and use it to trim videos and
Here's my problem: I use EntityFramework 4.1 Model first, and I have two assembly
I had a Problem to use DotNet 4.0 DLL in a DotNet 2.0 Application,
well this is my problem i use 2 source first query (select * from
Okay, so here's my problem: We use FOP for creating pretty report output. We

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.