Board index » cppbuilder » Cannot create pre-compiled header

Cannot create pre-compiled header


2004-02-25 08:15:00 PM
cppbuilder53
Hello all,
I was building my Active Server Page Object with BCB6 yesterday and then an
error occured (while compiling).
The error is:
Build
[C++ Error] atlcom.h(24): E2141 Declaration syntax error
[C++ Warning] Dialogs.hpp(437): W8058 Cannot create pre-compiled header:
initialized data in header
I was thinking: 'no problem', i will start all over to get rid of this error
but now, even when i start compiling a totally new project the same error
messages keeps coming up....
I am pretty new to BCB and C++ in general so my question is, what steps to
take to get rid of the error messages?
Marcel
 
 

Re:Cannot create pre-compiled header

When I include <DateUtils.hpp>in my service app,
the compiler starts to issue a warning:
Dialogs.hpp(437) W8058 Cannot create pre-compiled header: initialized
data in header
I remove above include, then the warning disappears.
Any ideas?
 

Re:Cannot create pre-compiled header

"Tumurbaatar S." < XXXX@XXXXX.COM >wrote in message
Quote
When I include <DateUtils.hpp>in my service app,
the compiler starts to issue a warning:

Dialogs.hpp(437) W8058 Cannot create pre-compiled header: initialized
data in header

I remove above include, then the warning disappears.

Any ideas?

Try removing the 2 sections of initialised constants in math.hpp.
Des
 

{smallsort}

Re:Cannot create pre-compiled header

Try this:
Move any lines containing the #include statements for
header files that generate that complaint down to
below/after the line on which the #pragma hdrstop is
found.
. Ed
Quote
Tumurbaatar S. wrote in message
news: XXXX@XXXXX.COM ...

When I include <DateUtils.hpp>in my service app,
the compiler starts to issue a warning:

Dialogs.hpp(437) W8058 Cannot create pre-compiled header: initialized
data in header

I remove above include, then the warning disappears.
 

Re:Cannot create pre-compiled header

May be I have accidentally removed this directive or
it was not included by IDE when I started a project,
but my service CPP did not have a such directive on the top.
So I've added it and now OK!
Thank you!
"Ed Mulroy [TeamB]" < XXXX@XXXXX.COM >wrote in message
Quote
Try this:

Move any lines containing the #include statements for
header files that generate that complaint down to
below/after the line on which the #pragma hdrstop is
found.

. Ed

>Tumurbaatar S. wrote in message
>news: XXXX@XXXXX.COM ...
>
>When I include <DateUtils.hpp>in my service app,
>the compiler starts to issue a warning:
>
>Dialogs.hpp(437) W8058 Cannot create pre-compiled header: initialized
>data in header
>
>I remove above include, then the warning disappears.



 

Re:Cannot create pre-compiled header

Quote
... but my service CPP did not have a such
directive on the top. ...
Oh no!
A *.CPP file is a source file. It does not need that because it
is never mentioned in a #include statement.
Only header files, *.H (or perhaps *.HPP) files are the ones
that get included.
Source files are added by Project|Add_to_project.
Header files are added by the #include statements in source
files.
. Ed
Quote
Tumurbaatar S. wrote in message
news: XXXX@XXXXX.COM ...

May be I have accidentally removed this directive or
it was not included by IDE when I started a project,
but my service CPP did not have a such directive on the top.
So I've added it and now OK!
Thank you!
 

Re:Cannot create pre-compiled header

From #pragma hdrstop description:
"...Use this pragma directive only in source files. The pragma has no effect
when it is used in a header file..."
Seems you misunderstood me. My main form/service source
did not have 'hdrstop' on the top of a file, so I added it manually.
Other units of my project have these 2 lines on the beginning of
source/CPP files:
#include <vcl.h>
#pragma hdrstop
and I've just copied it to the main source.
Thanks, again!
"Ed Mulroy [TeamB]" < XXXX@XXXXX.COM >wrote in message
Quote
>... but my service CPP did not have a such
>directive on the top. ...

Oh no!

A *.CPP file is a source file. It does not need that because it
is never mentioned in a #include statement.

Only header files, *.H (or perhaps *.HPP) files are the ones
that get included.

Source files are added by Project|Add_to_project.
Header files are added by the #include statements in source
files.

. Ed

>Tumurbaatar S. wrote in message
>news: XXXX@XXXXX.COM ...
>
>May be I have accidentally removed this directive or
>it was not included by IDE when I started a project,
>but my service CPP did not have a such directive on the top.
>So I've added it and now OK!
>Thank you!