|
Boost Users : |
Subject: Re: [Boost-users] [ptr_container] ptr_map and MinGW: "a declaration of assert must be available", even with cassert included
From: Thorsten Ottosen (thorsten.ottosen_at_[hidden])
Date: 2009-06-18 03:47:57
philipp_muenzel_at_[hidden] skrev:
> 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.
Hm. I have no idea, actually. I tried to grep for assert in the source
without any luck :-(
Are the ptr container headers the only headers that you include?
-Thorsten
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