Board index » cppbuilder » 16K Limit On #ifndef in Header?

16K Limit On #ifndef in Header?

I have a header, originally generated by the new component wizard, that
gives me an "unexpected end of conditional started on line 8" error.
The code at the point of error is a series of "__property [some parent
property];" declarations in the __published portion of the main class
declaration.  If I remove enough comments preceding the point of error,
the file will eventually compile without error.

I am using BCB4 with patch #1 installed.

Is there a 16K limit on #ifxxx statements?  Any other ideas?

Thanks,
robert

 

Re:16K Limit On #ifndef in Header?


Never mind.  I found the following on DejaNews, quoted below FYI.
Closing the file in the IDE editor solved it.

robert

<quote>
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.
</quote>

Other Threads