gbadev.org forum archive

This is a read-only mirror of the content originally found on forum.gbadev.org (now offline), salvaged from Wayback machine copies. A new forum can be found here.

C/C++ > IntelliSense problem

#164664 - DiscoStew - Wed Nov 12, 2008 7:30 pm

Ok, I just recently upgraded to VS2008, and now I am having problems with IntelliSense and stuff like structures that it should recognize.

What is odd is that my DS projects compile fine, and any structures that are put together in the devkitARM folder show up fine when I want to see their contents, but anything in the folder that my project is in won't show up. I've tried closing the program, deleting the *.ncb file that IntelliSense uses, but nothing seems to fix it. I went to basic scraps of my project. It compiles, but Intellisense does not work with any of the structures I create. I created a project with dovoto's template, and made a single structure to try it out. Still nothing.

Anyone know of anything that I haven't tried out yet?
_________________
DS - It's all about DiscoStew

#164665 - Chano Marrano - Wed Nov 12, 2008 7:46 pm

Try to add the .h directories of your project to VC++ include directories (I don't remember where was that option). Or better, try CodeBlocks, code completion works much better than in Visual Studio (Intellisense works when it wants :p).
_________________
Sh*tty RPG

#164667 - DensitY - Wed Nov 12, 2008 8:41 pm

Chano Marrano wrote:
(Intellisense works when it wants :p).


LOL yeah aren't that the truth, I'm forever bashing F2 in VC when I want intellisense to work. I should try codeblocks.

#164686 - DiscoStew - Thu Nov 13, 2008 10:30 pm

I think I got it working without having to actually add the include directory to the project. What I finally figured out is that if I change how I do "includes" in the actual code file.

Instead of something like...
Code:
#include "me.h"


...I ended up trying...
Code:
#include "../include/me.h"



Of course, my project folders would need to be set in this manner, but I already do that, so no problems here.
_________________
DS - It's all about DiscoStew

#165087 - thesean - Tue Dec 09, 2008 4:56 pm

Late reply, but for archiving purposes, I think changing your includes to that format is the same as adding your include folder to your "include search path" in intellisense options.

Here's how to do that for those interested:

1. Go to projects >> (projectname) options (alt+f7)

-Project options window should pop up.

2. In the left pane, expand the Configuration Options headline if necessary by clicking on the arrow on the left hand side.

-You should now see: General, Debugging, NMake

3. Select NMake

-Right pane shows options

4. In the right pane, under the "Intellisense" header, add any directories desired to the "Include Search Path" field.

-for example, you could add c:\my_project_root\include or c:\devkitPro\libnds\include

-separate entries with a semicolon ;

Hope that helps, if anyone even needed the information =)