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

  • Home
  • SEARCH
  • 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 1014811
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 16, 20262026-05-16T10:18:24+00:00 2026-05-16T10:18:24+00:00

gcc 4.4.3 c89 linux I am using log4c and have placed the inc and

  • 0

gcc 4.4.3 c89 linux

I am using log4c and have placed the inc and lib in the following directories

/home/jeff/projects/gateway/tools/log4c/inc
/home/jeff/projects/gateway/tools/log4c/lib

In my Makefile I have specified the inc and lib path:

INC_PATH = -I tools/log4c/inc
LIB_PATH = -L tools/log4c/lib
LIBS = -llog4c

In my lib directory I have the following shared libraries:

lrwxrwxrwx 1 root root     17 2010-08-26 15:57liblog4c.so -> liblog4c.so.3.1.0
lrwxrwxrwx 1 root root     17 2010-08-26 15:57 liblog4c.so.3 -> liblog4c.so.3.1.0
-rw-r--r-- 1 root root 100180 2010-08-26 15:55 liblog4c.so.3.1.0

I compile my application on my development machine, then copy the binary and tools directory to the test machine

So when I execute binary on the test machine I get the following error:

./app: error while loading shared libraries: liblog4c.so.3: cannot open shared object file: No such file or directory

However, everything works fine on my development machine which has the same directory structure i.e.

dev machine:

/projects/gateway/app
/projects/gateway/tools/log4c/inc
/projects/gateway/tools/log4c/lib

test machine:

/projects/gateway/app
/projects/gateway/tools/log4c/inc
/projects/gateway/tools/log4c/lib

So I am wondering why it can’t find it the shared library.

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-05-16T10:18:25+00:00Added an answer on May 16, 2026 at 10:18 am

    /projects/gateway/tools/log4c/lib should either be put to /etc/ld.so.conf (call /sbin/ldconfig after) or to LD_LIBRARY_PATH shell variable so the dynamic linker would know where to search for the required shared library.

    See Program Library HOWTO (3.5. Installing and Using a Shared Library) for more info

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

Sidebar

Related Questions

gcc 4.4.4 c89 I have always done the following when using structs to hide
gcc 4.4.2 c89 I have the following code. #if defined ( __linux__ ) log_msg(stderr,
gcc 4.4.4 c89 I have the following code and 2 structures that have to
gcc 4.4.4 c89 I have the following in my state.c file: enum State {
gcc 4.4.4 c89 I have the following code in my channel.h file typedef struct
gcc 4.5.1 c89 compiling with the following flags: -Wall, -Wextra I have the following
I am using gcc 4.4.2 on linux I am just wondering does gcc automatically
gcc 4.4.3 c89 I am just getting started with log4c. However, there is very
gcc (GCC) 4.1.2 c89 Red Hat Enterprise Linux Server release 5.4 2.6.18-164.el5 GNU gdb
gcc 4.4.5 c89 I recently downloaded and installed log4c on my development machine. I

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.