Code::Blocks Forums

Developer forums (C::B DEVELOPMENT STRICTLY!) => Development => Topic started by: Pecan on July 15, 2006, 04:03:50 am

Title: Open descriptor errs on sdk.h
Post by: Pecan on July 15, 2006, 04:03:50 am
ubuntu 510 svn 2750

On two files, I get fdopen errs on #include <sdk.h>.
Files: Filepathpanel.cpp and genericselectpath.cpp get his error.

I deleted both /devel and /output and /.objs
I also did a build clean, then a rebuild.
All other files using sdk.h compile just fine.

If I replace the sdk.h include with an #include <sdk_common.h>, all compiles ok.

Any ideas?

Code
-------------- Build: Scripted wizard in Code::Blocks - Unix ---------------
Compiling: plugins/scriptedwizard/buildtargetpanel.cpp
Compiling: plugins/scriptedwizard/compilerpanel.cpp
Compiling: plugins/scriptedwizard/filepathpanel.cpp
plugins/scriptedwizard/filepathpanel.cpp:1:17: error: calling fdopen: Bad file descriptor
Process terminated with status 1 (103 minutes, 35 seconds)
1 errors, 5 warnings

thanks
pecan
Title: Re: Open descriptor errs on sdk.h
Post by: Ceniza on July 15, 2006, 04:11:23 am
I got a problem like that once. It seems it was caused by re-inclusion of the precompiled header.

BTW... isn't 103 minutes a lot of time to build Code::Blocks?
Title: Re: Open descriptor errs on sdk.h
Post by: mandrav on July 15, 2006, 08:38:48 am
Ceniza is right:
Never, ever, include a precompiled header in a header file (*.h). Only in implementation files (*.cpp)...
Title: Re: Open descriptor errs on sdk.h
Post by: Pecan on July 15, 2006, 01:39:37 pm
Ceniza is right:
Never, ever, include a precompiled header in a header file (*.h). Only in implementation files (*.cpp)...


Now wait a moment, I get this error without making any mods to the svn update. So where is the extra include comming from?

I only changed the include in the .cpp files to get around the error.

Are you saying that svn should not include the <sdk.h> or that sdk.h is doing the double include. I'm confused here.

@Ceniza
  103 minutes to the error. 4Hrs to do a full "clean" build. I'm doing it on my old  333mhz laptop.

Title: Re: Open descriptor errs on sdk.h
Post by: killerbot on July 15, 2006, 01:45:37 pm
Quote
4Hrs to do a full "clean" build.
now that's nearly a real nightly/daily build ;-)
Title: Re: Open descriptor errs on sdk.h
Post by: Raijinsetsu on July 15, 2006, 03:43:56 pm
When using GCC, you never have to directly include a precompiled header anyways.

Quote from: GCC.org
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.
Here's the link: http://gcc.gnu.org/onlinedocs/gcc/Precompiled-Headers.html (http://gcc.gnu.org/onlinedocs/gcc/Precompiled-Headers.html)