Board index » cppbuilder » BCB4 Header size limit?

BCB4 Header size limit?

Hi!

I have a main form with a lot of components and which handles a lot of
events. Both the form components and events have descriptive names. I ran
into a problem whereby the compiler was reporting an premature end-of-file.

I eventually concluded that there must be a header size limit or internal
buffer limit for which had been exceeded, because as soon as I got the size
down to about 15.2 kb it was OK. If I only added a few extra bytes - they
could be anything: spaces, comments, whatever - the problem came back.

There must be some other factors at play though, because the include folder
has several Borland supplied headers that are much larger (one is about 2
mb).

Does anyone know what is actually happening and if there is any way around
it?

regards,
Alan.

 

Re:BCB4 Header size limit?


Hi Alan,

Quote
> Does anyone know what is actually happening and if there is any way around
> it?

This sounds like an IDE bug that involves the IDE passing buffers
from open Editor files to the compiler, and yes it seems to involve
magic size chunks l6K. The following text is from a soon-to-be-
published bug report. In some of the test cases closing the file
in the Code Editor helped,

--Craig

The test case has a header1 that includes a header2
that in turn includes header1. Without the sentinels
(#ifdef __Header_H ) this would be a circular
reference and would not compile. The problem is that
for files of a certain size, the IDE (not the compiler)
buffering/loading of the files doesn't recognize the ifdefs.
The problem should only show up when file in question
is open in the IDE editor. If an unexplained EOF flags
in a header try closing the header and re-making.

Re:BCB4 Header size limit?


This is a known bug in the IDE.  I'm not sure of all the variables that play
into it occurring, but it has to do with a buffer overrun.  I've seen it
work if the file in question is not modified, and is not open in the IDE.
That's not very useful for files that are in development and hit this bug.
One workaround (which really isn't satisfactory IMHO) is to use the command
line compiler.  It does not have this problem.

But the best think you can do is to get the file into a small enough size,
and then stop making it grow.  If possible, break it into smaller pieces,
that may help.

(I'm assuming it's the "End of File in conditional" error?  I've been
plagued by it as well...)

Chris (TeamB)

Alan van der Vyver wrote in message <7m0ou5$fr...@forums.borland.com>...

Quote
>Hi!

>I have a main form with a lot of components and which handles a lot of
>events. Both the form components and events have descriptive names. I ran
>into a problem whereby the compiler was reporting an premature end-of-file.

>I eventually concluded that there must be a header size limit or internal
>buffer limit for which had been exceeded, because as soon as I got the size
>down to about 15.2 kb it was OK. If I only added a few extra bytes - they
>could be anything: spaces, comments, whatever - the problem came back.

>There must be some other factors at play though, because the include folder
>has several Borland supplied headers that are much larger (one is about 2
>mb).

>Does anyone know what is actually happening and if there is any way around
>it?

>regards,
>Alan.

Other Threads