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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 17, 20262026-06-17T07:52:06+00:00 2026-06-17T07:52:06+00:00

gcc 4.7.2 Hello, I am trying to create a shared library that uses the

  • 0
gcc 4.7.2

Hello,

I am trying to create a shared library that uses the apr (apache portable runtime) library.

However, when I do the following I get this:

ldd libjq.so
linux-gate.so.1 =>  (0xf777b000)
libdl.so.2 => /lib/libdl.so.2 (0xf774b000)
libapr-1.so.0 => not found
libc.so.6 => /lib/libc.so.6 (0xf7599000)
/lib/ld-linux.so.2 (0x4be59000)

Cannot find it:

libapr-1.so.0 => not found

I have compiled the apr from source so that are not on the system path. I have placed the include and libs in a tools folder to be used with this project.

My directory structure looks like this:

projects/apr_queue/src/job_queue.c
projects/apr_queue/tools/lib/apr*
projects/apr_queue/tools/inc/apr*

I compile and create the object file:

cc -c -m32 -Wall -Wextra -g -I../tools/apr/inc job_queue.c -D_LARGEFILE64_SOURCE -o job_queue.o

And create the shared library like this:

cc -m32 -shared -o libjq.so -L../tools/apr/lib -lapr-1 job_queue.o

There are no linking or compile error. Just the not found for the apr-l library.

Am I missing a step here.

Many thanks for any suggestions,

  • 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-17T07:52:07+00:00Added an answer on June 17, 2026 at 7:52 am

    You could either pass the directory to the linker with rpath this will add the directory to the runtime library search path

    -Wl,-rpath,/path/tools/apr/lib
    

    Or use the LD_LIBRARY_PATH enviroment variable:

    $ LD_LIBRARY_PATH=/path/tools/apr/lib ldd myprog
    
    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

gcc (GCC) 4.6.3 c89 apache runtime portable libraries Hello, Just a simple question I
gcc (GCC) 4.7.0 c89 Hello, I have the following structure that I am trying
This is what I get when trying to compile a simple hello world program
gcc (GCC) 4.7.2 GNU bash, version 4.2.37 Hello, I have the following bash script
I am trying to execute the following command in irb, exec 'gcc j.cpp' but,
I am trying to create a function guilabel_wrap(char *buffer, int maxlen) that takes a
I'm trying to get a Hello World application compiled for an ARM target. I'm
I'm using g++(GCC) 4.7.2 on Ubuntu. Just trying to figure out how to get
I have a simple code that I am trying to compile with lm32-rtems4.11-gcc. I
gcc (GCC) 4.7.0 c89 Hello, I have trying to save a database of rows

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.