Author Topic: Open descriptor errs on sdk.h  (Read 4545 times)

Offline Pecan

  • Plugin developer
  • Lives here!
  • ****
  • Posts: 2778
Open descriptor errs on sdk.h
« 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
« Last Edit: July 15, 2006, 04:05:22 am by Pecan »

Offline Ceniza

  • Developer
  • Lives here!
  • *****
  • Posts: 1441
    • CenizaSOFT
Re: Open descriptor errs on sdk.h
« Reply #1 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?

Offline mandrav

  • Project Leader
  • Administrator
  • Lives here!
  • *****
  • Posts: 4315
    • Code::Blocks IDE
Re: Open descriptor errs on sdk.h
« Reply #2 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)...
Be patient!
This bug will be fixed soon...

Offline Pecan

  • Plugin developer
  • Lives here!
  • ****
  • Posts: 2778
Re: Open descriptor errs on sdk.h
« Reply #3 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.

« Last Edit: July 15, 2006, 01:42:51 pm by Pecan »

Offline killerbot

  • Administrator
  • Lives here!
  • *****
  • Posts: 5494
Re: Open descriptor errs on sdk.h
« Reply #4 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 ;-)

Raijinsetsu

  • Guest
Re: Open descriptor errs on sdk.h
« Reply #5 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