Board index » cppbuilder » CPPSAVEX_MAGIC assertion

CPPSAVEX_MAGIC assertion


2004-09-10 04:08:36 AM
cppbuilder102
So, I'm faced with a quandry to the point where I don't know where to
proceed to debug from here. Using BCB6 sp4 (5.6.4),
the code sketched out below compiles, links, executes normally when compiled
using the BCB6 IDE. However, after using the supplied bpr2mak.exe and
compiling from the commandline I receive:
derived.cpp
Assertion failed .\base.h(xx) : sym->symTempCheck.tempCheck ==
CPPSAVEX_MAGIC at d:\helena\bcc\indep\cppsavex.c(124)
where xx is the line number of next_time() function declaration in base.h.
TDateTime::CurrentDateTime() is a static method so I see no problem with
this syntactically. This code compiles normally under BCB5 IDE and command
line.
I have no idea why it compiles and executes using the BCB6 IDE and not the
command line and am stymied on how to proceed. Removing the default
argument to the next_time() method removes the compile time assertion.
The command line options being generated by the bpr2mak.exe are
-Od -H=myheader.csm -Hc -Vx -Ve -X -r -a8 -b -k -y -v -vi -c -tW -tWM -w-par
-I<include paths here>-D_DEBUG;_RTLDLL;NOSTRICT;USEPACAKAGES -nobj\ <.cpp
files here>
// token.h
class Token
{
};
// base.h
#include "token.h"
#include <systdate>
class Base
{
public:
virtual TDateTime next_time(const Token &token,
const TDateTime &after =
TDateTime::CurrentDateTime()) = 0;
};
//derived.h
#include "base.h"
class Derived : public Base
{
public:
virtual TDateTime next_time(const HelperClass &helper,
const TDateTime &after =
TDateTime::CurrentDateTime());
};
// derived.cpp
#include "derived.h"
TDateTime Derived::next_time(const HelperClass &helper, const TDateTime
&after)
{
return(TDateTime(0));
}
 
 

Re:CPPSAVEX_MAGIC assertion

You'll want to re-post this in the proper forum:
borland.public.cppbuilder.ide.
This forum is for Borland's pre-Builder line.
Regards,
Bruce
 

Re:CPPSAVEX_MAGIC assertion

Shawn Butler wrote:
Quote
So, I'm faced with a quandry to the point where I don't know where to
proceed to debug from here. Using BCB6 sp4 (5.6.4),
As Bruce said, this group is for the older pre-builder compilers.
The Builder groups have cppbuilder in their names.
Quote
this syntactically. This code compiles normally under BCB5 IDE and command
line.

I have no idea why it compiles and executes using the BCB6 IDE and not the
command line and am stymied on how to proceed. Removing the default
argument to the next_time() method removes the compile time assertion.
Probably want to make sure you are using the RW STL in your BCB6
instead of the default (new in 6) STL. BCB5 used the RW version.
There have been several threads in the builder groups where the
procedure to switch was laid out (simple as I recall).
 

{smallsort}

Re:CPPSAVEX_MAGIC assertion

Since you have not posted to the BCB ide group, I'll put this here.
What you show is not capable of being checked out
Not given enough source is given to create an executable
No linker command is given
The source does this which is invalid:
#include <sysdate>
There is no standard header named systdate. There is a VCL header
named systdate.h which would be included as #include <systdate.h>and
not #include <systdate>were it to be a stand alone header, which it
is not. That is why you got the error which said to not include the
file directly, but rather to include system.hpp
. Ed
Quote
Shawn Butler wrote in message
news: XXXX@XXXXX.COM ...
 

Re:CPPSAVEX_MAGIC assertion

I have not had big problems with STLPort, certainly not ones that
would make me revert to RW.
. Ed
Quote
Bob Gonder wrote in message
news: XXXX@XXXXX.COM ...
 

Re:CPPSAVEX_MAGIC assertion

Will post in appropriate newsgroup. Thought this was the compiler forum.
"Ed Mulroy [TeamB]" < XXXX@XXXXX.COM >wrote in message
Quote
Since you have not posted to the BCB ide group, I'll put this here.

What you show is not capable of being checked out

Not given enough source is given to create an executable
No linker command is given
The source does this which is invalid:

#include <sysdate>

There is no standard header named systdate. There is a VCL header
named systdate.h which would be included as #include <systdate.h>and
not #include <systdate>were it to be a stand alone header, which it
is not. That is why you got the error which said to not include the
file directly, but rather to include system.hpp

. Ed

>Shawn Butler wrote in message
>news: XXXX@XXXXX.COM ...