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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 5, 20262026-06-05T02:11:12+00:00 2026-06-05T02:11:12+00:00

I’m making a makefile, and getting this error: List.h:10:18: error: calling fdopen: Bad file

  • 0

I’m making a makefile, and getting this error:

List.h:10:18: error: calling fdopen: Bad file descriptor

I have no idea why it happens.
Here’s the beginning of List.h:

#ifndef List_h__
#define List_h__

#include "Data.h"
#include "general.h"

where #include “Data.h” is the 10th line. Data and then general is the order in which the dependencies are written in the makefile:

List.o: List.cpp List.h Data.h general.h
    g++ List.cpp $(f)

data doesn’t include anything and general includes only iostream, and no other class also includes iostream.

Here’s Data.h:

#ifndef Data_h__
#define Data_h__

class Data
{
private:
public:
    //default constructor
    Data() {}
    //destructor
    virtual ~Data()=0;
    /*****************************************************************************
    * function name: operator<
    * The Input: This Data, other Data
    * The output: The operator will compare between two datas. The comparison will
    * be used to create a sorted list.
    *****************************************************************************/
    virtual bool operator<(const Data& other) const =0;
};

Data::~Data() {}

#endif //Data_h__

I initially had the trivial implementation of Data’s destructor after the =0, and I’ve also tried to move the trivial implementations of the constructor and destructor to a .cpp file. All of the above didn’t work. Please help – I’ve been stuck on this makefile for hours and it’s driving me crazy! Thanks!

  • 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-05T02:11:14+00:00Added an answer on June 5, 2026 at 2:11 am

    First, check to see if you are using precompiled headers. If so delete all the precompiled headers.

    If that doesn’t work, then I think this may help. There is a bug in some version of g++ with including a header multiple times in a single unit.

    Look at see if you are including Data.h multiple times.


    Precompiled headers: look for .gch files and delete them.

    Precompiled header

    Often large projects have many header files that are included in every source file. The time the compiler takes to process these header files over and over again can account for nearly all of the time required to build the project. To make builds faster, GCC allows users to `precompile’ a header file; then, if builds can use the precompiled header file they will be much faster.

    To create a precompiled header file, simply compile it as you would any other file, if necessary using the -x option to make the driver treat it as a C or C++ header file. You will probably want to use a tool like make to keep the precompiled header up-to-date when the headers it contains change.

    A precompiled header file will be searched for when #include is seen in the compilation. As it searches for the included file (see Search Path) the compiler looks for a precompiled header in each directory just before it looks for the include file in that directory. The name searched for is the name specified in the #include with `.gch’ appended. If the precompiled header file can’t be used, it is ignored.

    For instance, if you have #include "all.h", and you have all.h.gch in the same directory as all.h, then the precompiled header file will be used if possible, and the original header will be used otherwise.

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

Sidebar

Related Questions

I have a string like this: La Torre Eiffel paragonata all&#8217;Everest What PHP function
I have just tried to save a simple *.rtf file with some websites and
this is what i have right now Drawing an RSS feed into the php,
I have this code to decode numeric html entities to the UTF8 equivalent character.
I'm parsing an RSS feed that has an &#8217; in it. SimpleXML turns this
I have this code: - (void)parser:(NSXMLParser *)parser foundCDATA:(NSData *)CDATABlock { NSString *someString = [[NSString
I have a reasonable size flat file database of text documents mostly saved in
I have some data like this: 1 2 3 4 5 9 2 6
link Im having trouble converting the html entites into html characters, (&# 8217;) i
For some reason, after submitting a string like this Jack’s Spindle from a text

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.