Hi,
if I want use the boost libs in an existing MFC/AFX environment I have a lot of compiling problems, what seems to depend on the order of includes. One
"Arno Schäfer"
what I see, but I don't understand, is the following compile error:
Microsoft (R) 32-bit C/C++ Optimizing Compiler Version 12.00.8804 for 80x86 Copyright (C) Microsoft Corp 1984-1998. All rights reserved. cl /MDd /W3 /GR /GX /Zi /Od /I ...bunch of includes... /D "WIN32" /D "_DEBUG" /D "_WINDOWS" /D "_SECDLL" /D "_AFXDLL" /D "_ MBCS" /D "_GXDLL" /D "NOMINMAX" /D "_SECNOMSG" /D "_GXNOMSG" /D "_SFLNOMSG" /Fp" D:\temp\debug\GUIClient/Plato.pch" /YX"stdafx.h" /Fo"D:\temp\debug\GUIClient/" / Fd"D:\temp\debug\GUIClient/" /FD /Zm200 /GZ /c "F:\Gui+Client\src\AboutDlg.cpp" AboutDlg.cpp Note: Using precompiled header Automatically linking with RWUXThemeSD.lib ..\..\PlatoServer\Basics\boost\inc\boost/detail/iterator.hpp(326) : error C2039: 'difference_type' : is not a member of 'Iterator'
ator.h(77) : see declaration of 'Iterator' ..\..\PlatoServer\Basics\boost\inc\boost/detail/iterator.hpp(331) : see reference to class template instantiation 'boost::detail::standard_iterator_traits<Iterator>' being compiled ...
So it looks like, that the template parameter "Iterator" in "boost::detail::standard_iterator_traits<Iterator>" conflicts with the template class "stingray::foundation::Iterator" in some header files from
..\..\..\libs\stingray\objective_studio\include\foundation\Patterns\Iter the
GUI control stuff, what was included before the boost header. How is this possible, what has the template parameter "Iterator" in the namespace "boost::detail" to do with the template class "Iterator" in the namespace "stingray::foundation" has anybody an explaination for this?
My guess is that if you read the error message literally, it's telling you
that somewhere in _your_ code you are (indirectly?) trying to instantiate a
boost::standard_iterator_traits struct using a RogueWave Iterator. The
RogueWave iterator is _not_ a standard conforming iterator. It does not have
the requisite typedefs as shown below:
template <typename _Elem>
class IteratorBase
{
public:
typedef _Elem Element;
virtual ~IteratorBase() {}
public:
virtual Element Next() = 0;
virtual Element Prev() = 0;
virtual Element Current() = 0;
virtual bool Finished() = 0;
virtual void Start() = 0;
};
template