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

Related Questions

I'm not quite sure how this happened, but somehow a completely empty hierarchy of
This sure seems like a simple error to fix. However, I somehow can't figure
this is my first time really using this site. I'm relatively new to using
I need to generate multiple random values under SQL Server 2005 and somehow this
I have somehow misconfigured fingers. This leads to a very annoying situation. I select
There must be an easy way to do this, but somehow I can wrap
The first time I open one of my child forms from the main form
I'm new to test driven development and first time I'm tring to use it
Scenario is, database is in the maintenance phase. this database is not developed by
Somehow my FireFox 2 got corrupted, and the status bar is about 3/4 above

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.