Board index » cppbuilder » Re: Compiler error

Re: Compiler error


2006-02-16 08:14:12 AM
cppbuilder114
"Steven" < XXXX@XXXXX.COM >wrote in message
Quote
How would I proceed in fixing this error?
That error is caused by changes to the compiler in BDS 2006. You have to
now put '&' in front of the method that you pass to Synchronize(), ie:
Synchronize(&DoRelayProgress);
Gambit
 
 

Re:Re: Compiler error

Steven wrote:
Quote
How would I proceed in fixing this error?

[C++ Error] DownloadThread.cpp(46): E2285 Could not find a match for
'TThread::Synchronize(void)'

The code is only:

Synchronize(DoRelayProgress);

BDS2006 - It compiled under bcb6 before....
Steven

Synchronize(&DoRelayProgress);
^
| Add & here.
John.
 

Re:Re: Compiler error

Thanks Guys,
I must be reading the wrong information somewhere,
I never did notice where that was mentioned.
Steven
 

{smallsort}

Re:Re: Compiler error

Steven wrote:
Quote
Thanks Guys,

I must be reading the wrong information somewhere,
I never did notice where that was mentioned.


It was mentioned in the b.p.c.v.c.u group, by Remy and John (<G>).
Seriously, though, this is why correct help functionality and
documentation is needed for the product...
David Erbas-White
 

Re:Re: Compiler error

In article < XXXX@XXXXX.COM >,
David Erbas-White < XXXX@XXXXX.COM >wrote:
Quote
It was mentioned in the b.p.c.v.c.u group, by Remy and John (<G>).
It's also in QC:
<qc.borland.com/wc/qcmain.aspx>
--
-David
Nihil curo de ista tua stulta superstitione.
 

Re:Re: Compiler error

Whenever i compile my ASP.NET forms(C# Code behind), i get the following compiler error message as "De{*word*81} Assertion Failure:"ioFP" in...\win32src\pefile.cpp at line 660 Continue exection?". Then 'the page cannot be display' message is displayed and the application close automatically.
Please anyone help me
 

Re:Re: Compiler error

The following code compiles without any error. But if try to change the line
int i = 0; with
for (int i=0; i<1; ++i)
Any ideas
the compiler is giving the following error.
[C++ Error] RadyeManager.cpp(284): E2451 Undefined symbol 'Er'
//---------------------------------------------------------------------------
bool __fastcall TRadyeManager::Cozum()
{
try {
Screen->Cursor = crHourGlass;
int i = 0; //
auto_ptr<TSonluElemanCozum>Sec(new
TSonluElemanCozum(this,i));
Screen->Cursor = crDefault;
FormYyp->TBRapor->Enabled = true;
RaporGoster();
return false;
}
catch(const ProjeException& Er) { // Compiler is complaining
in this line
Screen->Cursor = crDefault;
// HataGoster();
Application->ShowException(const_cast<ProjeException*>
(&Er));
}
return true;
}
 

Re:Re: Compiler error

Sabetay Toros yazmış:
Quote

The following code compiles without any error. But if try to change the
line
int i = 0; with
for (int i=0; i<1; ++i)
Any ideas

the compiler is giving the following error.
[C++ Error] RadyeManager.cpp(284): E2451 Undefined symbol 'Er'

//---------------------------------------------------------------------------

bool __fastcall TRadyeManager::Cozum()
{
try {
Screen->Cursor = crHourGlass;
int i = 0; //
auto_ptr<TSonluElemanCozum>Sec(new
TSonluElemanCozum(this,i));
Screen->Cursor = crDefault;
FormYyp->TBRapor->Enabled = true;
RaporGoster();
return false;
}
catch(const ProjeException& Er) { // Compiler is complaining
in this line
Screen->Cursor = crDefault;
// HataGoster();
Application->ShowException(const_cast<ProjeException*>
(&Er));
}
return true;
}
This is a definitly a compiler error.
If I add begin and end braces to the for line the error disappears.
for(int i=0; i < 1; ++i) {
..
auto_ptr<TSonluElemanCozum>Sec( new TSonluElemanCozum(this,i));
...
}
Now it is okey. I'm using BCB 6.
Sabetay
 

Re:Re: Compiler error

Sabetay Toros < XXXX@XXXXX.COM >wrote:
Quote
>bool __fastcall TRadyeManager::Cozum()
>{
>try {
>Screen->Cursor = crHourGlass;
>int i = 0; //
>auto_ptr<TSonluElemanCozum>Sec(new
>TSonluElemanCozum(this,i));
>Screen->Cursor = crDefault;
>FormYyp->TBRapor->Enabled = true;
>RaporGoster();
>return false;
>}
>catch(const ProjeException& Er) { // Compiler is complaining
>in this line
This is a definitly a compiler error.

If I add begin and end braces to the for line the error disappears.


for(int i=0; i < 1; ++i) {
..
auto_ptr<TSonluElemanCozum>Sec( new TSonluElemanCozum(this,i));
...
}

Now it is okey. I'm using BCB 6.

Sabetay
This seems to be a compiler error because according to C++
Standard a "for" statement can have any statement as it's
body (including declaration statement) even though it has
little or no practical meaning.
The declared object lives only in the scope of the for
statement body and gets constructed and destructed with every
loop (only once in your example). That is why your
TSonluElemanCozum object gets immediately deleted after it has
been created (deleted through the destructor of Sec)
Vaclav
 

Re:Re: Compiler error

On Mar 22, 5:07 am, "Vaclav Cechura" < XXXX@XXXXX.COM >wrote:
Quote
>If I add begin and end braces to the for line the error
>disappears.

>for(int i=0; i < 1; ++i) {
>auto_ptr<TSonluElemanCozum>Sec( new
>TSonluElemanCozum(this,i));
>}

This seems to be a compiler error because according to C++
Standard a "for" statement can have any statement as it's
body (including declaration statement) even though it has
little or no practical meaning.
That's correct. In C++, declarations are also statements, but
in C they are not. In C the following is incorrect:
for (int i = 0; i != 1; ++i)
int y;
 

Re:Re: Compiler error

How can I find the meaning of error messages given by Borland Command Line Compiler ? I'm having trouble locating the problem with an error like this one "Functions with exception specifications are not expanded inline"...
 

Re:Re: Compiler error

That is not an error. It is a warning.
The keyword 'inline' and the implied inlilne for class or structure member
functions whose code is given in the body of the class or structure
declaration is a request or suggestion to the compiler.
The warning is to inform you that while you expected the function to be
inlined it will not be.
Not all items that can be programmed can be efficiently inlined by the
compiler. Exceptions and inline assembly are examples of items that cannot
be inlined.
See my reply to your other message explaining the correct place to post
messages concerning the C++ Builder product.
. Ed
Quote
Victor wrote in message
news:4723ca44$ XXXX@XXXXX.COM ...

How can I find the meaning of error messages given by Borland
Command Line Compiler ? I'm having trouble locating the problem
with an error like this one "Functions with exception specifications
are not expanded inline"...