On Fri, 2 Oct 2009, Petry Stefan wrote:
> Unfortunately, I am not able to use configure, because I am working
> with libmesh on Windows. A student created an eclipse workspace for
> the compilation of libmesh,
Interesting. What are you guys doing about the POSIX dependencies
that libMesh has? sys/time.h, unistd.h, stdlib.h... we've gotten
libMesh to compile with Cygwin on Windows, but even that took a little
> but I am no experienced user of gcc. Do you know which compiler
> switch of gcc has to be set to show debugging assertions?
We do some different things depending on which version of gcc you're
using, but the important parts for assertions are:
Don't use -DNDEBUG, which turns off all our assertions.
Use -DDEBUG, which turns on some of our debugging-only code.
Use "-D_GLIBCXX_DEBUG -D_GLIBCXX_DEBUG_PEDANTIC", which turns on the
libstdc++ container tests.
(All this will make your code much too slow for production use, but is
worth it when something's going wrong)
Finally, recompile everything. We use extensions like dbg.o and opt.o
to let debug-mode and optimized-mode object files live side-by-side,
but your Eclipse setup may not be doing the same. And if it's not,
then depending on how smart it is about recognizing compiler flags as
a dependency, you may need to tell it delete your non-debugging object
files before recompiling.