| |
 | Posted by Matthew Wilson in reply to Martin Moene | Permalink Reply |
|
Matthew Wilson 
Posted in reply to Martin Moene
| Martin
It works fine for me.
What cmd-line params are you specifying? I just did the following:
H:\STLSoft\Releases\1.9\STLSoft\test\scratch\stlsoft\message_assert\vc71>copy con ..\message_assert.cpp
#include <stlsoft/stlsoft.h>
int main()
{
STLSOFT_MESSAGE_ASSERT("This message should not be shown", true);
STLSOFT_MESSAGE_ASSERT("This message should be shown", false);
return 0;
}
^Z
1 file(s) copied.
H:\STLSoft\Releases\1.9\STLSoft\test\scratch\stlsoft\message_assert\vc71>cl -I%STLSOFT%/include -nologo ..\message_assert.cpp &&
message_assert.exe
message_assert.cpp
H:\STLSoft\Releases\1.9\STLSoft\test\scratch\stlsoft\message_assert\vc71>cl -I%STLSOFT%/include -MLd -D_DEBUG -nologo
..\message_assert.cpp && message_assert.exe
message_assert.cpp
** I got the assert dialog here **
H:\STLSoft\Releases\1.9\STLSoft\test\scratch\stlsoft\message_assert\vc71>
Doing the same works for vc6 as well. :-)
"Martin Moene" <moene@eld.physics.LeidenUniv.nl> wrote in message news:4848F4C6.2020604@eld.physics.LeidenUniv.nl...
> Hi Matthew,
>
> I suspect something has broken the STLSOFT_[MESSAGE_]ASSERT() macro
> with visual C++ 6 and 8 (possibly 7 also). See below.
>
> Cheers, Martin.
> ___
>
> * Test program:
>
> #include <stlsoft/stlsoft.h>
> #include <iostream> // std::cout, std::endl
>
> int main()
> {
> std::cerr << "\tBefore STLSOFT_MESSAGE_ASSERT( \"test\", 0 )" << std::endl;
>
> STLSOFT_MESSAGE_ASSERT( "test", 0 );
> STLSOFT_ASSERT( 0 );
>
> std::cerr << "\tAfter STLSOFT_MESSAGE_ASSERT( \"test\", 0 )" << std::endl;
>
> return 0; // keep vc6 happy
> }
>
> * Results:
>
> - GCC 3.4.2:
> Before STLSOFT_MESSAGE_ASSERT( "test", 0 )
> Assertion failed: ("test" && 0), file bug_vc6-8-stlsoft_message_assert.cpp, line 8
>
> - VC6, VC8:
> Before STLSOFT_MESSAGE_ASSERT( "test", 0 )
> After STLSOFT_MESSAGE_ASSERT( "test", 0 )
>
> ___
|