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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 17, 20262026-05-17T17:09:23+00:00 2026-05-17T17:09:23+00:00

gcc 4.4.5 c89 I recently downloaded and installed log4c on my development machine. I

  • 0
gcc 4.4.5 c89

I recently downloaded and installed log4c on my development machine.
I put all the headers and includes in the following directories.

project_name/tools/log4c/inc
project_name/tools/log4c/libs

However, as I installed the headers where in the system path:

/usr/include/log4c/*.h

So in my project, when I was including layout.h. layout.h would include the following header in this system path.

#include <log4c/logging_event.h>

I created the same directory structure on the target machine as I did for my development for tools/inc and tools/lib.

However, it wouldn’t compile because I hadn’t installed the log4c on the target machine so the system path for log4c didn’t exist. However, the user of the target machine will not be expected to install log4c. Everything should work out of the box.

So what I think is a good idea is to edit all the headers. from this:

#include <log4c/logging_event.h>

to

#include "logging_event.h"

All the headers are in the inc directory, so I won’t be using the system path.

My question is this a good idea to put all the headers into a single directory and edit them to point to this single inc directory?

Many thanks for any advice,

  • 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-17T17:09:24+00:00Added an answer on May 17, 2026 at 5:09 pm

    I’d leave the headers alone — changing them is potentially error-prone and time-consuming, especially if you want to update your version of log4c at some point.

    Am I understanding right that the same headers that are in /usr/include/log4c are also in your project_name/tools/log4c/inc directory? If so, move them to project_name/tools/log4c/inc/log4c, and add an include path to your gcc command line using the -I flag:

    gcc -I project_name/tools/log4c/inc myprog.c etc etc
    

    We’re moving the files to log4c/inc/log4c so that <log4c/logging_event.h> can still match on the log4c directory under log4c/inc/.

    EDIT: I originally typoed -L as the flag, which sets library search paths rather than include file search paths. -I is the correct flag for this case.

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

Sidebar

Related Questions

gcc 4.4.2 c89 I have the following code. #if defined ( __linux__ ) log_msg(stderr,
gcc 4.4.3 c89 linux I am using log4c and have placed the inc and
gcc 4.4.3 c89 I am just getting started with log4c. However, there is very
gcc 4.4.4 c89 However, I am having a problem trying to display all the
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.4.4 c89 I have always done the following when using structs to hide
gcc 4.5.1 c89 compiling with the following flags: -Wall, -Wextra I have the following
gcc 4.5.1 c89 I am using the following code to read in a line

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.