开发者

Visual Studio 2008 class view missing classes

I've just ported a large project from an older version of Visual C++ to VS2008 and notice that the class view is mising a bunch of my classes. Looking at the solution view, the header files declaring those classes a开发者_运维问答re present, so I'd expect to see them in class view. Any reason why certain classes would be excluded, or is there any way to refresh class view to include all the classes in the solution ?


Have you tried deleting the .ncb and the .pch, and all the .o files, then a full rebuild? I find that this often fixes my intellisense problems, and it may be related.


Tried Hans' suggestion of looking what was different about a header file with a missing class, and noticed the following

myheader.h

#ifndef MYHEADER_INCLUDED
#define MYHEADER_INCLUDED

class MyClass 
{ 
'
'
};

#endif

Now everything after the #ifdef was greyed out in the editor, which suggested the IDE throught the macro was already defined. The source also contains a fair amount of conditional inclusion in the header files, e.g.

#ifndef MYHEADER_INCLUDED
#include "myheader.h"
#endif

Changing the header to

myheader.h

#pragma once

class MyClass 
{ 
'
'
};

seems to resolve the class view problem, though I don't know how it will effect compilation times.

Edit Just finished and did a rebuild, no significant change to compilation time.

0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜