Boost logo

Boost Users :

Subject: [Boost-users] [ptr_container] ptr_map and MinGW: "a declaration of assert must be available", even with cassert included
From: philipp_muenzel_at_[hidden]
Date: 2009-06-17 17:31:37


Hello,

I'm using boost::ptr_map successfully on Linux, compiling with gcc 4.3.2.
However, now i tried the same code on Windows XP, using MinGW with gcc 3.4.5 i get the following error:
"error: there are no arguments to 'assert' that depend on a template parameter, so a declaration of 'assert' must be available".

I had exactly the same error on Linux, there i put a #include <cassert> before the #include to boost::ptr_map and everything worked.
But on windows, i tried #include <cassert> and #include <assert.h>, also a
#include <cassert>
#ifndef assert
    #define assert assert
#endif
in case something was messing with the name.
I tried version 1.39 and 1.37 on windows and the result is the same.

I also carefully inspected the headers i also include, suspecting some might #define an include-guard that confuses with assert.

No luck yet and I'm out of ideas now.

Any ideas are greatly appreciated.

Regards,
Philipp
____________________________________________________________
Text: GRATIS für alle WEB.DE-Nutzer: Die maxdome Movie-FLAT!
Jetzt freischalten unter http://movieflat.web.de


Boost-users list run by williamkempf at hotmail.com, kalb at libertysoft.com, bjorn.karlsson at readsoft.com, gregod at cs.rpi.edu, wekempf at cox.net