MSVC error driving me nuts

Andreas Pakulat apaku at gmx.de
Sun Sep 21 18:38:02 CEST 2008


On 21.09.08 17:55:36, Ralf Habacker wrote:
> Andreas Pakulat schrieb:
> > even though I've recently read the templates chapter in my stroustrup,
> > it seems I'm still missing something.
> >
> > Suppose I have the following two class definitions:
> >
> > template <typename T> class AbstractBuilder 
> > {
> >
> > protected:
> >     virtual void setContextOnNode( T * node, Context* ) = 0;
> > public:
> >     void deleteContextOnNode( T* node ) 
> >     {
> >         delete contextFromNode( node );
> >         setContextOnNode( node, 0 );
> >     }
> > };
> >
> > class MyBuilder : public AbstractBuilder<AST>
> > {
> > protected:
> >     virtual void setContextOnNode( AST*, Context* ) {}
> > };
> >
> > MSVC barfs on the setContextOnNode line in AbstractBuilder, telling me
> > that "setContextOnNode" is an unknown identifier, or rather that the
> > identifier cannot be found. 
> >
> > Now I don't really understand why it thinks so or how to fix this. Of
> > course this compiles just fine with gcc/linux.
> >
> > The actual code is
> > trunk/KDE/kdevplatform/language/duchain/builders/abstractcontextbuilder.h
> > trunk/KDE/kdevelop/languages/cpp/cppduchain/contextbuilder.h
> >
> > Can somebody please let me know where I'm misunderstanding something?
> >   
> 
> I tried to compile kdevelop - it depends on a precompiled kdevplatform, 
> which isn't buildable yet

It is buildable, I've just fixed it up last night :)

> - there is a problem with anonsvn.kde.org
> 
> Hole externen Verweis nach »kdevplatform\plugins\quickopen\expandingtree«
> svn: Kann nicht mit Host »anonsvn.kde.org« verbinden: Es konnte keine 
> Verbindung hergestellt werden, da der Zielcomputer die Verbindung verw
> eigerte.

Apparently either anonsvn.kde.org is down, or you have a network
problem. kdevplatform uses an svn external into katepart's sources in
kdelibs thats what its trying to fetch here.

Anyway, this particular problem could be solved by replacing the 

typedef AbstractBuilder<AST> BuilderBase;

with a real class that inherits AbstractBuilder<AST> and then
subclassing the MyBuilder from that new class.

Andreas

-- 
Never look up when dragons fly overhead.


More information about the Kde-windows mailing list