Boost logo

Boost :

From: Peter Dimov (pdimov_at_[hidden])
Date: 2003-10-17 09:37:20


Vincent Finn wrote:
> On Thu, 16 Oct 2003 19:08:10 +0200, Martin Wille <mw8329_at_[hidden]>
> wrote:
>
>> The problem is that you are using old style headers
>> (iostream.h) together with standard headers (iostream). One
>> of them defines/undefines a macro which later will confuse
>> other headers, esp the RTTI stuff.
>
> That's why I said I don't include the .h file
> if it is included it is done somewhere I can't find
>
> I tried creating clean projects using the VC6 Wizards and none of them
> have a problem, so I am stumped

The problem is that <typeinfo> and <typeinfo.h> both use _INC_TYPEINFO as an
include guard, so the first one "wins".

> One thing I did notice is that VC7.1 compiles the same code perfectly
> which it shouldn't do if it is a problem with my code.
> I assume there have been changes between in the libraries in VC6 and
> VC7 which stop this from happening

Yes, this is fixed in VC7+.

If you have a precompiled header, try to #include <typeinfo> before all
other headers and see if this fixes the problem.


Boost list run by bdawes at acm.org, gregod at cs.rpi.edu, cpdaniel at pacbell.net, john at johnmaddock.co.uk