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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 12, 20262026-05-12T07:32:42+00:00 2026-05-12T07:32:42+00:00

Somehow this is the first time I’ve ever encountered this problem in many years

  • 0

Somehow this is the first time I’ve ever encountered this problem in many years of programming, and I’m not sure what the options are for handling it.

I am in the process of porting an application to Linux, and there is a header file in one of the directories that apparently has the same name as a header file in the standard C library, and when “cstdlib” is included from another file in that directory, it’s trying to include the local file rather than the correct one from the standard library.

In particular, the file is named “endian.h”, which is trying to be included from /usr/include/bits/waitstatus.h. So instead of including /usr/include/bits/endian.h it is trying to include ./endian.h. makes no difference

Is my only option to rename the endian.h in the project to something else, or is there a way that I can force the compiler to look in the same directory as the file that it’s being included from first?


Edit:

Okay it was just a stupid mistake on my part. My Makefile was setting -I. , so it was looking in the current directory first. D’oh.

  • 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-12T07:32:42+00:00Added an answer on May 12, 2026 at 7:32 am

    There is an important difference between:

    #include "endian.h" // Look in current directory first.
    

    And

    #include <endian.h> // Look in the standard search paths.
    

    If you want the one in the current directory, use the quotes. If you want the system one, then use the angle brackets. Note that if you have put the current directory in the include path via the “-I” flag, then both might resolve to the one in the current directory, in which case you shouldn’t use “-I” with the current directory.

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

Sidebar

Ask A Question

Stats

  • Questions 176k
  • Answers 176k
  • Best Answers 0
  • User 1
  • Popular
  • Answers
  • Editorial Team

    How to approach applying for a job at a company ...

    • 7 Answers
  • Editorial Team

    What is a programmer’s life like?

    • 5 Answers
  • Editorial Team

    How to handle personal stress caused by utterly incompetent and ...

    • 5 Answers
  • Editorial Team
    Editorial Team added an answer You need to set TileMode, Stretch, AlignmentX and AlignmentY properties… May 12, 2026 at 3:12 pm
  • Editorial Team
    Editorial Team added an answer Use \g instead of \n: re.sub(r'0([0-9])',r'\g<1>4',"foo02") For more information: http://docs.python.org/library/re.html#re.sub May 12, 2026 at 3:12 pm
  • Editorial Team
    Editorial Team added an answer I have done two different things in the past: Use… May 12, 2026 at 3:12 pm

Related Questions

Somehow this is the first time I've ever encountered this problem in many years
I have the following object: [Serializable] public class ExampleImage { public int ID {
I am trying out PDO in PHP for the first time. I thought that
I have a rails time-based query which has some odd timezone sensitive behaviour, even
I am working in a C# winforms project and I have a user control

Trending Tags

analytics british company computer developers django employee employer english facebook french google interview javascript language life php programmer programs salary

Top Members

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.