When trying to compile my code with g++ i get this:

MayaFunctions.h:5:27: error: calling fdopen: Bad file descriptor

in that line, I simply have
#include "AnotherFile.h"

Google told me this has something to do with precompiled headers, but I can't figure out how to turn them off.

1) how to turn off using precompiled headers with g++ flags?
2) what else would be causing this??



hmm, this is wierd....
try posting the whole code, or a bigger sample...

as for g++, u have to add flags in order to use precompiled headers, if no flags are added precompiled headers are not used... so normally u compile u're code without using them

It ended up that "AnotherFIle.h" was part of a static library that I had compiled. When I looked in it's directory, there were a bunch of .gch files!! (I think they are the precompiled headers??) I had just compiled the library the same day and I definitly did not turn on any flags for precompiled headers... does it default to something different when you compile with just -c so only object files are created?

Very strange...

This article has been dead for over six months. Start a new discussion instead.