Mon 05 Apr 2004 01:56:05 PM UTC, comment #1:
Channelflow is written to use the glibc assert macros found in /usr/include/assert.h, under GNU/Linux and gcc. The macro you refer to is surrounded by an #ifdef WIN32, so gcc should never to try compile it. How is Are you using the Makefiles provided with channelflow?
The asserts have always been a problem under Windows. The
assetion macros at the end of mathdefs.h, within #ifdef WIN32, were copied from glibc's assert.h. Dietmar Rempfer and I did this a couple years ago. Maybe you could look for a working assert macro system within Visual C++.
In the meantime, the modification you list should be ok. You might want to try
#define assert(expr) (if(!expr) {assertion_error();}
with assertion_error() declared and defined as
void assertion_error(); // in mathdefs.h
void assertion_error() { // in mathdefs.cpp
cerr << "Assertion failed. Aborting." << endl;
}
In general, I don't have a Windows system to test code on, and I prefer to focus my development efforts on GNU/Linux.
But if others contribute modifications for compilation under Windows, I'm happy to include them.
John
|