Board index » cppbuilder » Cannot create pre-compiled header, initialized data in header?

Cannot create pre-compiled header, initialized data in header?


2004-07-02 06:53:18 AM
cppbuilder81
I have been using BCB6SP4 for a long time now. I have a project that has been in existence for over
a year and have been precompiling headers just fine. Now, however, I get the above warning (and
therefore no pre-compiled header) for lines like
(Dialog.hpp)
extern PACKAGE bool __fastcall PromptForFileName(AnsiString &AFileName, const AnsiString AFilter =
"", const AnsiString ADefaultExt = "", const AnsiString ATitle = "", const AnsiString AInitialDir =
"", bool SaveDialog = false);
Essentially the compiler doesn't seem to like 'const AnsiString x=""'. It decides that is
initialized data. My question though, is how the heck did that start? I haven't changed the
compiler in ages, Dialog.hpp is an old vcl file. Did I hit a compiler switch somewhere? Anyone run
across this warning/error and if so, how did you fix it?
Thanks much,
Michael
 
 

Re:Cannot create pre-compiled header, initialized data in header?

I'v run accross this, and the only way I got around it was to make sure I
didn't include Dialogi.hpp, or any other header that included it, in my list
of pre-compiled headers.
As to why it just started happening, did you recently add a new header to be
pre-compiled? If so, make sure it doesn;t include Dialog.hpp somewhere
along the way...
Mark
"Michael Wade" < XXXX@XXXXX.COM >wrote in message
Quote
I have been using BCB6SP4 for a long time now. I have a project that has
been in existence for over
a year and have been precompiling headers just fine. Now, however, I get
the above warning (and
therefore no pre-compiled header) for lines like

(Dialog.hpp)
extern PACKAGE bool __fastcall PromptForFileName(AnsiString &AFileName,
const AnsiString AFilter =
"", const AnsiString ADefaultExt = "", const AnsiString ATitle = "", const
AnsiString AInitialDir =
"", bool SaveDialog = false);

Essentially the compiler doesn't seem to like 'const AnsiString x=""'. It
decides that is
initialized data. My question though, is how the heck did that start? I
haven't changed the
compiler in ages, Dialog.hpp is an old vcl file. Did I hit a compiler
switch somewhere? Anyone run
across this warning/error and if so, how did you fix it?

Thanks much,
Michael
 

Re:Cannot create pre-compiled header, initialized data in header?

Thanks for the info. I had just installed the upgrades to Dev Express and I believe that's where it
came from. Bummer!
Thanks again,
Michael
On Tue, 6 Jul 2004 18:56:46 -0400, "Mark Guerrieri" < XXXX@XXXXX.COM >wrote:
Quote
I'v run accross this, and the only way I got around it was to make sure I
didn't include Dialogi.hpp, or any other header that included it, in my list
of pre-compiled headers.

As to why it just started happening, did you recently add a new header to be
pre-compiled? If so, make sure it doesn;t include Dialog.hpp somewhere
along the way...

Mark

"Michael Wade" < XXXX@XXXXX.COM >wrote in message
news: XXXX@XXXXX.COM ...
>I have been using BCB6SP4 for a long time now. I have a project that has
been in existence for over
>a year and have been precompiling headers just fine. Now, however, I get
the above warning (and
>therefore no pre-compiled header) for lines like
>
>(Dialog.hpp)
>extern PACKAGE bool __fastcall PromptForFileName(AnsiString &AFileName,
const AnsiString AFilter =
>"", const AnsiString ADefaultExt = "", const AnsiString ATitle = "", const
AnsiString AInitialDir =
>"", bool SaveDialog = false);
>
>Essentially the compiler doesn't seem to like 'const AnsiString x=""'. It
decides that is
>initialized data. My question though, is how the heck did that start? I
haven't changed the
>compiler in ages, Dialog.hpp is an old vcl file. Did I hit a compiler
switch somewhere? Anyone run
>across this warning/error and if so, how did you fix it?
>
>Thanks much,
>Michael

 

{smallsort}

Re:Cannot create pre-compiled header, initialized data in header?

Could you trim your quoting, please? Newsgroup guidelines ask that you
keep your quoting to a minimum. Thanks.
--
Andrue Cope [TeamB]
[Bicester, Uk]
info.borland.com/newsgroups/guide.html
 

Re:Cannot create pre-compiled header, initialized data in header?

This is a stupid error. I just upgraded with the sp 4 för bcb6 and now the
ide bombards me with these pch errors. The project works fine with bcb6 ent
(56sec build) but in the pro version it takes only 1969 seconds to build!
woopdidoo! And now to the tedious work of trying to fix a workaround for
this patch-introduced bug. See you next spring!