Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

calling fdopen: Bad file descriptor

Tags:

c

gcc

fdopen

I'm getting the following error when trying to compile my program:

calling fdopen: Bad file descriptor

I've read this might be a problem related to including a precompiled header in one of my header files. The file which is causing the error includes the stdio.h header in it so I have access to the FILE type. If I remove this, the error disappears, but then I can't use the FILE type. Does anybody know how I can fix this?

like image 380
LandonSchropp Avatar asked Feb 14 '10 19:02

LandonSchropp


1 Answers

Hard to tell without details, but it's indeed most probably due to an out-of-date precompiled header. Remove all .gch files and try again.

This is frequently reported as a bug against GCC, see the bugzilla entry here

like image 153
F'x Avatar answered Sep 30 '22 01:09

F'x