Bad file descriptor
| daviddoria | |||
| 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?? Thanks! Dave | |||
| rpgfan3233 | |||
| Try reordering the header files. I'm not sure if that will work, but it apparently worked for some test code at http://gcc.gnu.org/bugzilla/show_bug.cgi?id=13675 The bug was an issue with precompiled headers being included twice, which may be the case here. The same issue with fdopen() came up in that instance. Perhaps your problem and that bug are related to each other. | |||
| hcben00 | |||||
| I don't check here often so please forgive me if I never respond to any questions or responses... Solution to my similar problem after reading... Make sure the includes at the top of your headers and source are always in the same order and make sure the call to G++ is in the same order as listed in the top of the headers and source files. (Note: I didn't test the different combinations but I did get it to work my first try, this does assume the flexibility of having all sources.) Heres what I had trouble with
my original G++ call
g++ Increment.cpp Time.cpp Composition.cpp TestComposition.cpp -o TestCompMy solution:
My G++ call stays the same:
g++ Increment.cpp Time.cpp Composition.cpp TestComposition.cpp -o TestComp | |||||
Registered users can reply in this forum.
