6

I can't get intellisense to work. Even if I start with an empty project and add just one file to it with only an include for iostream and an int main() function that prints a char with cout (basically the most basic program), if I try to get intellisense to show anything (say by typing cout.) I get

IntelliSense: 'No additional information available' (See 'Troubleshooting IntelliSense in C++ Projects' for further help.)

Hours of googling have yielded a couple of articles over at the Microsoft sites that suggest a bunch of things to try or reasons why it wouldn't work. I have tried and eliminated them all, except for one that mentions that stdafx.h has to be in the path.

What is this file?
How do I know if it is in the path if I don't know where it is?
What does it have to do with IntelliSense?
Should I add this file to my project to get it to work?

Thank you.

Baruch
  • 20,590
  • 28
  • 126
  • 201
  • 2
    Are you using C++ or C++/CLI? – JaredPar Mar 02 '11 at 19:10
  • plain ol' c++. (at least, I assume I am. I didn't chose anything special. I'm not even sure what CLI is) – Baruch Mar 02 '11 at 19:22
  • If you aren't using precompiled headers, `stdafx.h` won't be your problem. Check to make sure intellisense is actually turned on (on lower end systems, it actually should be turned off in 2010 as it will make coding virtually impossible when it eats up 100% of your CPU every 60 seconds). When you include `iostream` and type `std::` does it provide you with a list of available types in the `std` namespace? – Zac Howland Mar 02 '11 at 19:24
  • It is turned on. No, it doesn't give anything other then the above error for `std::` – Baruch Mar 02 '11 at 19:33

12 Answers12

8

I got it solved by the Microsoft team at http://connect.microsoft.com/VisualStudio/feedback/details/652838/intellisense-not-creating-ipch-folder

It had to do with a certain Windows Update installed on WinXP. The solution was to install VS2010_SP1 and then a certain update over it.

Baruch
  • 20,590
  • 28
  • 126
  • 201
  • This is the right answer, for completion I suggest you to specify your OS and the SP installed. – IssamTP Oct 10 '13 at 16:11
  • To be a little more specific, it is stated in the link: " To resolve, VS2010 SP1 must be installed, then KB2526044 must be installed over top." – user666412 Feb 12 '16 at 17:36
  • And after some struggle, I've got an updated link for the KB: https://support.microsoft.com/en-us/hotfix/KBHotfix.aspx?kbnum=2526044 – user666412 Feb 12 '16 at 18:31
  • @user666412 It is available here http://windows-update-checker.com/Lists/Visual%20Studio%202010%20hotfix%20list.htm – Baruch Feb 14 '16 at 12:09
2

Look at this question :C++ VS Express 2010 Intellisense

It was solved by pressing CTRL+J .

EDIT: maybe it's the stdafx.h problem !

Add a file stdafx.cpp and a file stdafx.h to the project ! Use #include "stdafx.h" as yhe first line of code in all your .cpp files. Include all rarely/never changing and frequently used header-files in stdafx.h. Turn on precompiler-headers in your project and rebuild the project.

(Create a dummy project which have precompiled headers on to see how it's been done)

Community
  • 1
  • 1
engf-010
  • 3,980
  • 1
  • 14
  • 25
2

Do you use the /UseEnv switch when opening visual studio? It breaks Intellisense for c++ projects.

Mp0int
  • 18,172
  • 15
  • 83
  • 114
asdf
  • 21
  • 3
1

Please find *.sdf file (Intellisence database cache) in project directory and delete it and relaunch project solution this will bring back your intellisence.

DigviJay Patil
  • 986
  • 14
  • 31
0

I thought I should mention this:

In Visual Studio 2012 I noticed that Intellisense suddenly stopped working in my C++ project (same error as the poster described). This happened because I had added "DEBUG" as a Preprocessor definition under Project Properties -> C/C++ -> Preprocessor.

Once I removed it from that list and instead put it in the code ( #define DEBUG ) intellisense suddenly started working again.

I don't know why this happens, I just know it screws up my intellisense. I hope this helps someone.

Valdemar
  • 950
  • 1
  • 12
  • 20
0

WIN32;_WINDOWS;_DEBUG;Append _DEBUG; remove Append _DEBUG;

YogeshNC
  • 311
  • 1
  • 2
  • 12
0

baruch's answer worked for me. for completion, here is also the link to the VS2010-SP1: http://www.microsoft.com/en-us/download/details.aspx?id=23691

so first installing this and then the hot-fix that baruch referred to solved me the problem, although the whole installation took almost 1:30 hour! (including one restart on my Win-XP machine.)

hamid attar
  • 388
  • 1
  • 8
0

I know this is an old question, but I had a similar problem IntelliSense: 'No additional information available' (See 'Troubleshooting IntelliSense in C++ Projects' for further help.). My problem wasn't related with stdafx.h.

To solve my problem, I closed VS2010, deleted the .sdf and .suo files as well as the ipch directory inside the project's main folder.

Then I restarted VS2010, waited for it to build all its metadata again and Intellisense (autocompletion) worked nicely.

EDIT: I am not aware if this "maneuver" has negative side effects.

0

There are a couple of threads about similar problems: click on Help at VS2010 and look for Intellisense.

http://social.msdn.microsoft.com/Search/en-US?query=intellisense%20settings&refinement=123&beta=0&ac=1

http://social.msdn.microsoft.com/Forums/en/vswpfdesigner/thread/75c4cc8d-9a81-4bda-84f0-f619f7493b3b

stdafx.h should be added automatically when you create a New Project.

From the file:
// stdafx.h : include file for standard system include files,
// or project specific include files that are used frequently, but
// are changed infrequently
0

Just throwing this out there, you are using namespace std? eg:

std::cout.

because intellisense wont work if it doesn't see cout

edit: I over looked that error message so this isn't the case but leaving the answer in case it might help someone down the line.

Zak
  • 936
  • 10
  • 19
0

Maybe it never got installed, have you tried a repair install?, it's worth a shot..

Zak
  • 936
  • 10
  • 19
-1

IntelliSense stores it's data in the SQL Server, which is installed during VS2010 setup. I recommend you check if the SQL Server Service is running.

Nocturnal
  • 683
  • 7
  • 25