Intellisense issue in VC 2008 express
-
- Gnome
- Posts: 324
- Joined: Sun May 11, 2008 9:27 pm
- x 20
Intellisense issue in VC 2008 express
Hello, I've encountered a problem with Intellisense. It cant find all of my classes, spread over a few files. After time of search and research, i deleted an 'Additional include directories' entry. The entry defined a path to the local projects include files where all my classheaders are defined and poof, intellisense found all classes. The problem now is that i cant compile since i removed the include dir...
Has someone experince regarding this why intellisense acts like this?
Has someone experince regarding this why intellisense acts like this?
- RedEyeCoder
- Gnome
- Posts: 344
- Joined: Sat Jun 16, 2007 7:29 am
- Location: Brisbane, Australia
- xavier
- OGRE Retired Moderator
- Posts: 9481
- Joined: Fri Feb 18, 2005 2:03 am
- Location: Dublin, CA, US
- x 22
Re: Intellisense issue in VC 2008 express
Put the directory back. I don't know where you saw that advice but you must have misinterpreted it.mrmclovin wrote:Hello, I've encountered a problem with Intellisense. It cant find all of my classes, spread over a few files. After time of search and research, i deleted an 'Additional include directories' entry. The entry defined a path to the local projects include files where all my classheaders are defined and poof, intellisense found all classes. The problem now is that i cant compile since i removed the include dir...
Has someone experince regarding this why intellisense acts like this?
Delete the .ncb file in the same directory as your .sln. That's Intellisense's database. You have to do the same thing with VAX, btw (albeit with a different method) -- anything that parses code to help you with it, can get confused with lots of code changes.
- RedEyeCoder
- Gnome
- Posts: 344
- Joined: Sat Jun 16, 2007 7:29 am
- Location: Brisbane, Australia
-
- Gnome
- Posts: 324
- Joined: Sun May 11, 2008 9:27 pm
- x 20
Re: Intellisense issue in VC 2008 express
I've already tried to delete the .ncb but to no avail. If I am editing the file where a class which intellisense not recognize, the class popups in the class list but will disappear again after 2 seconds ..xavier wrote:Put the directory back. I don't know where you saw that advice but you must have misinterpreted it.mrmclovin wrote:Hello, I've encountered a problem with Intellisense. It cant find all of my classes, spread over a few files. After time of search and research, i deleted an 'Additional include directories' entry. The entry defined a path to the local projects include files where all my classheaders are defined and poof, intellisense found all classes. The problem now is that i cant compile since i removed the include dir...
Has someone experince regarding this why intellisense acts like this?
Delete the .ncb file in the same directory as your .sln. That's Intellisense's database. You have to do the same thing with VAX, btw (albeit with a different method) -- anything that parses code to help you with it, can get confused with lots of code changes.
more suggentions/hints?
- Chris Jones
- Lich
- Posts: 1742
- Joined: Tue Apr 05, 2005 1:11 pm
- Location: Gosport, South England
- x 1
are you closing visual studio before deleting the file?I've already tried to delete the .ncb but to no avail.
also, VAX does occaisionally get problems, but it has built-in features for clearing the cache etc rather than having to find the file to delete. It's also possible to get it to reparse a file.
-
- Gnome
- Posts: 324
- Joined: Sun May 11, 2008 9:27 pm
- x 20
Yes, I've tried all "common" solutions (like deleted .ncb, rebuild, resave etc.). I suspect that it's possible that it has to do with how all files/classes are connected to eachother due to #include, #ifndef-#define, and which directories you set in VC++. It's just my theory atm, and I was therefore wondering if someone can give me hints/experience about what I should try to do.Chris Jones wrote:are you closing visual studio before deleting the file?I've already tried to delete the .ncb but to no avail.
also, VAX does occaisionally get problems, but it has built-in features for clearing the cache etc rather than having to find the file to delete. It's also possible to get it to reparse a file.
I'm using the conventional anti-redefine:
Code: Select all
#ifndef CLASS_H
#defined CLASS_H
#include some_include_files
namespace my_namespace{
class a_class {};
}
#endif
(and the source/defintion goes in .cpp-files)
-
- Gnome
- Posts: 324
- Joined: Sun May 11, 2008 9:27 pm
- x 20
I'm still looking for a solution for this as not even Google can help me. The closest clue I've got into is what I said in the first post. When I delete the local include path entry, intellisense recognize every class and method I've defined! It even know in what file the class is defined. While intellisense knows, VC++ does not .. since I cant open a file via the #include statement. Looking for new ideas !!?? I will not let intellisense win
- KungFooMasta
- OGRE Contributor
- Posts: 2087
- Joined: Thu Mar 03, 2005 7:11 am
- Location: WA, USA
- x 16
- Contact:
As mentioned above, you should only need to do the following:
1. Clean all projects.
2. Close Visual Studio
3. Delete .ncb file
4. Open Project/Solution in Visual Studio
5. Build all projects.
6. Give a little time for intellisense database to be built in background. Sometimes you can see intellisense being updated in the status bar.
If all else fails, commit to SVN, wipe your disk of all traces of this app, grab code from SVN, and build project(s).
1. Clean all projects.
2. Close Visual Studio
3. Delete .ncb file
4. Open Project/Solution in Visual Studio
5. Build all projects.
6. Give a little time for intellisense database to be built in background. Sometimes you can see intellisense being updated in the status bar.
If all else fails, commit to SVN, wipe your disk of all traces of this app, grab code from SVN, and build project(s).
Creator of QuickGUI!
- Fish
- Greenskin
- Posts: 131
- Joined: Fri Aug 22, 2008 6:12 pm
I had a similar issue with VS2008 when I tried to reuse project files created with VS2003. Many classes were not visible and occasionally intellisense would hang. I used the process KungFooMasta wrote above and that fixed the problem with the invisible classes, however intellisense would hang each time I updated a class with a simple variable (like int foo;).
In the end I reverted to VS2005 express and have not had any problems.
In the end I reverted to VS2005 express and have not had any problems.
- syedhs
- Silver Sponsor
- Posts: 2703
- Joined: Mon Aug 29, 2005 3:24 pm
- Location: Kuala Lumpur, Malaysia
- x 51
Just wondering, have you applied SP1 for VC8? I didn't use VC8, but I think it may have solved the problem.Fish wrote:I had a similar issue with VS2008 when I tried to reuse project files created with VS2003. Many classes were not visible and occasionally intellisense would hang. I used the process KungFooMasta wrote above and that fixed the problem with the invisible classes, however intellisense would hang each time I updated a class with a simple variable (like int foo;).
A willow deeply scarred, somebody's broken heart
And a washed-out dream
They follow the pattern of the wind, ya' see
Cause they got no place to be
That's why I'm starting with me
And a washed-out dream
They follow the pattern of the wind, ya' see
Cause they got no place to be
That's why I'm starting with me
-
- Gnome
- Posts: 324
- Joined: Sun May 11, 2008 9:27 pm
- x 20
As I said, I've tried all _common_ solutions like the one you are suggesting. Intellisense behaves the same on 2 diffrent computers with 2 diffrent OS's and tested on VC++ 2005 and 2008. I'm quite sure it has to do something with my code and how intellisense interprets it.As mentioned above, you should only need to do the following:
1. Clean all projects.
2. Close Visual Studio
3. Delete .ncb file
4. Open Project/Solution in Visual Studio
5. Build all projects.
6. Give a little time for intellisense database to be built in background. Sometimes you can see intellisense being updated in the status bar.
If all else fails, commit to SVN, wipe your disk of all traces of this app, grab code from SVN, and build project(s).
My files generally have the structure:
Prereq.h
Code: Select all
namespace myNamespace {
class Foo;
class Bar;
}
Code: Select all
#include "Prereq.h"
namespace myNamespace {
class Foo {
public:
Bar* bar;
}
}
Code: Select all
#include "Foo.h"
namespace myNamespace {
#include "Bar.h"
[...]
}
So, I'm looking for new ideas that goes outside of the _common_ solutions as they don't work out for me!
Thanks!
- syedhs
- Silver Sponsor
- Posts: 2703
- Joined: Mon Aug 29, 2005 3:24 pm
- Location: Kuala Lumpur, Malaysia
- x 51
I dont know if this solves your problem, but in Foo.h, the class declaration should be terminated by ;. In VC2005, Intellisense will not function properly if your code doesn't compile.
A willow deeply scarred, somebody's broken heart
And a washed-out dream
They follow the pattern of the wind, ya' see
Cause they got no place to be
That's why I'm starting with me
And a washed-out dream
They follow the pattern of the wind, ya' see
Cause they got no place to be
That's why I'm starting with me
-
- Gnome
- Posts: 324
- Joined: Sun May 11, 2008 9:27 pm
- x 20
Re: Intellisense issue in VC 2008 express
Now, a couple of months later, Intellisense has gone less of a pain in the ass. Most of my classes and methods are recognized. I did not make any major changes in my code layout but I remember one thing I did and that was that I changed name on my core classes which were named like Application, Input, Physics etc to ApplicationManager, InputManager and so on. It could've been a name collision with Intellisense but Im not really sure.