Google Groups no longer supports new Usenet posts or subscriptions. Historical content remains viewable.
Dismiss

Unexpected end of file in conditional started on line 9

323 views
Skip to first unread message

AlphaBuilder

unread,
Mar 6, 1999, 3:00:00 AM3/6/99
to
OK - maybe i'm just too tired, or too slow this week, but it looks like my
c++builder as decided to do some funny stuf this week !!!

first, the reload file problem that was cause by long file (directory)
name, ok i changed my directory name and it work ok after that, but i was
using the same directory name since last year, why just this week ????

But now when i make a modification in a file (without any bug) it give
me this wird error
" Unexpected end of file in conditional started on line 9 " it stop
at the end of the file but the line 9 is the "#ifndef" of the header.... and
i didn't change any include...

when i undo the last changed, it still continue to give me this error, I
GIVE UP.....

please help ...

Jean (sorry for my bad english) Darveau


Chris Uzdavinis (TeamB)

unread,
Mar 6, 1999, 3:00:00 AM3/6/99
to
Sorry to say, but I know of this... it's a really nasty bug in the IDE
that seems to happen with certain files that are long. But they have to
have certain characteristics as well. One of my headers always causes
this, and it is aggravating. I *really* hope it gets fixed soon... The
only workaround I have found is to do a build from the command line.
(Yikes is right.)

Chris (TeamB)

David Richards

unread,
Mar 6, 1999, 3:00:00 AM3/6/99
to
Close the pages displaying the affected file and it's header in the Code Editor,
then build. The bug apparently only shows up if the code editor is currently
displaying the affected file.


(Of course, certain members of TeamB say that this bug doesn't exist.... I
wonder if their financial stake in the success of the product has anything to do
with it? )


Jody Hagins (TeamB)

unread,
Mar 7, 1999, 3:00:00 AM3/7/99
to


I haven't seen anyone say it doesn't exist. In fact, both Chris and
myself have commented on it several times. It is a real bug, and has
been reported. What more do you want us to say? None of us work for
borland.com, so we have no control over fixing it. In addition, none
of us have a financial stake in the success of BCB or any other
borland product (unless any are stock holders, or course). We are all
volunteers who, for some unknown reason, actually like doing this when
we get a chance.


Happy Building!
Jody
http://www.hagins.com/

Chris Uzdavinis (TeamB)

unread,
Mar 7, 1999, 3:00:00 AM3/7/99
to
Excuse me? Every member of TeamB (in the BCB group) that I know of is
well aware of this bug, and I have posted about it numerous times, and
have been vocal about it. In fact, it was no longer ago than last night
that I posted about it...

Secondly, none of us have any financial stakes. We do not work for
Borland, we do not get paid. Some of us sell software that would be of
interest to BCB users (TurboPower...) and the rest are just users.

Chris (TeamB)

AlphaBuilder

unread,
Mar 7, 1999, 3:00:00 AM3/7/99
to
Thank you Chris, it was good to know that i wasn't so tired after all ;-)

>> Close the pages displaying the affected file and it's header in the Code
Editor,
>> then build. The bug apparently only shows up if the code editor is
currently
>> displaying the affected file.

Yes David, i have done this and it work, but it is realy slowing
productivity !!!

So i have tried to verify again all my "#include" to see if i could solve
the problem because it look to me like it was some kind of "recursive"
"conditionnal" "including" problem that just appear (and yes my files are
getting long).

So i decided to put all my "personnal include" in all the .cpp files instead
of the .h files like i was doing for most of them, and when there was one of
my new type in those ".h" files i just put the reserve words "struct" or
"class" before each of them to be able to compile them before it read the
appropriate include file for it, and it work well after that, hope that
won't change next week ;-)

Hope that will work for you to...

thanks again

Jody Hagins (TeamB)

unread,
Mar 7, 1999, 3:00:00 AM3/7/99
to
On Sun, 7 Mar 1999 14:25:29 -0500, "AlphaBuilder"
<alphab...@alphabuilder.com> wrote:

>So i decided to put all my "personnal include" in all the .cpp files instead
>of the .h files like i was doing for most of them, and when there was one of
>my new type in those ".h" files i just put the reserve words "struct" or
>"class" before each of them to be able to compile them before it read the
>appropriate include file for it, and it work well after that, hope that
>won't change next week ;-)


One thing that works in most cases is to conditionally include. In
other words, your header files probably look like this...

#ifndef _MyHeader_h_
#define _MyHeader_h_

// bunch of header file stuff...

#endif


However, if you preface all #includes with conditional guards then
these problems go away. For example...


#ifndef _MyHeader_h_
#include <MyHeader.h>
#endif


for all files you include (that you may edit). Note that if you are
not going to edit header files often, simply close the files, and
REBUILD the project.

AlphaBuilder

unread,
Mar 8, 1999, 3:00:00 AM3/8/99
to
Thank you Jody ;-)

Could i ask you if what i have done is a bad practice ?

>>So i decided to put all my "personnal include" in all the .cpp files
instead
>>of the .h files like i was doing for most of them, and when there was one
of
>>my new type in those ".h" files i just put the reserve words "struct" or
>>"class" before each of them to be able to compile them before it read the
>>appropriate include file for it, and it work well after that, hope that
>>won't change next week ;-)

Thanks again

Jody Hagins (TeamB)

unread,
Mar 9, 1999, 3:00:00 AM3/9/99
to
On Mon, 8 Mar 1999 18:09:32 -0500, "AlphaBuilder"
<alphab...@alphabuilder.com> wrote:

>Thank you Jody ;-)
>
>Could i ask you if what i have done is a bad practice ?

Working around this kind of bug, almost nothing is "bad practice." Forward
declaring classes is quite common. I would probably guard headers before
including them, or even have a dos shell open and build from the command
line before I went that route, though.

But, if it works, then why not. Hopefully this will be fixed very soon.
I'm pressing very hard on this issue...

0 new messages