IntelliSense in Visual Studio 2010?
-
- Posts: 3
- Joined: Wed Oct 27, 2010 6:51 am
IntelliSense in Visual Studio 2010?
I finally decided to get back into DS development after a brief stint a while back. I set up my project to build and work in Visual Studio 2010. One thing always botheres me though, and I'm not sure how to deal with it.
I'm getting intellisense errors all over the place, and it's really kinda making my code look ugly with little red squiggles everywhere. I had this same problem with Visual Studio 2008 a while back when I did this before and tried to ignore it, but it's just bugging me. I've noticed in like every tutorial in setting up devkitArm in Visual Studio, their screenshots never have this problem.
This is what happens.
Basically, the error is that visual studio can't find the files and therefore can't parse them for intellisense. Then every single function I use in these headers, it'll draw a red line under because as far as visual studio is concerned, I'm using non-existent functions.
So I went into devkitarm and included the directories these files exist in. It worked. The files were found and I have intellisense to some degree, but now instead of telling me the functions don't exist, it underlines all the parameters I enter into the functions, because as far as intellisense is concerned, every single function in these headers has no parameters.
It's purely aesthetic, but really annoying to see my code covered in "errors".
Does anyone know how I might go about fixing this? Thanks guys.
I'm getting intellisense errors all over the place, and it's really kinda making my code look ugly with little red squiggles everywhere. I had this same problem with Visual Studio 2008 a while back when I did this before and tried to ignore it, but it's just bugging me. I've noticed in like every tutorial in setting up devkitArm in Visual Studio, their screenshots never have this problem.
This is what happens.
Basically, the error is that visual studio can't find the files and therefore can't parse them for intellisense. Then every single function I use in these headers, it'll draw a red line under because as far as visual studio is concerned, I'm using non-existent functions.
So I went into devkitarm and included the directories these files exist in. It worked. The files were found and I have intellisense to some degree, but now instead of telling me the functions don't exist, it underlines all the parameters I enter into the functions, because as far as intellisense is concerned, every single function in these headers has no parameters.
It's purely aesthetic, but really annoying to see my code covered in "errors".
Does anyone know how I might go about fixing this? Thanks guys.
Re: IntelliSense in Visual Studio 2010?
Aaaaaaaaaaaaaaa... black background in Visual Studio code window AAAAAAAAAAAAAAAAAGGGGGGHHHH!!!
Seriously, now... a problem that Visual Studio users face when coding with external compilers and tools, is that, even then, Intellisense still uses the syntax and conventions that their own compilers generate. You can see that when looking at code intended to be multiplatform, that uses #ifdef WIN32 macros and such... while your own compiler will obey whatever rules you put in your makefile, Intellisense won't care about them. What's worse, even if you remove the Windows-specific macros and stuff from the Project Properties page, you will still see code being grayed out inside a #ifndef WIN32 / #endif block. Mindblowing, at the very least.
It looks like the Intellisense behavior is, for all practical purposes, "burned into" its own code. Sorry.
Seriously, now... a problem that Visual Studio users face when coding with external compilers and tools, is that, even then, Intellisense still uses the syntax and conventions that their own compilers generate. You can see that when looking at code intended to be multiplatform, that uses #ifdef WIN32 macros and such... while your own compiler will obey whatever rules you put in your makefile, Intellisense won't care about them. What's worse, even if you remove the Windows-specific macros and stuff from the Project Properties page, you will still see code being grayed out inside a #ifndef WIN32 / #endif block. Mindblowing, at the very least.
It looks like the Intellisense behavior is, for all practical purposes, "burned into" its own code. Sorry.
Re: IntelliSense in Visual Studio 2010?
I am not sure this is the case. there are pre-processor definitions for makefile projects that are used by intellisense. they are on the project properties under "Configurations Properties" in the "NMake" section under "Intellisense". Like you said you do need to remove the default WIN32 stuff, but you also need to make sure you add in ARM9 and/or ARM7.
-
- Posts: 3
- Joined: Wed Oct 27, 2010 6:51 am
Re: IntelliSense in Visual Studio 2010?
The thing that gets me is whenever I see tutorials on setting up Visual Studio for devkitARM, they don't seem to have this issue. I'm not sure if they're doing something they're just not mentioning in these tutorials or what. I could disable intellisense error checking in the program settings, but that's an extreme I didn't want to have to do until I know that I've exhausted all other possibilities.
As for the black background, I usually don't run black =) I have a dark theme, but I was merely testing something with the black. It fits the VS2010's color theme better than bright white. I've been using it that way for several years though.
As for the black background, I usually don't run black =) I have a dark theme, but I was merely testing something with the black. It fits the VS2010's color theme better than bright white. I've been using it that way for several years though.
-
- Site Admin
- Posts: 1986
- Joined: Tue Aug 09, 2005 3:21 am
- Location: UK
- Contact:
Re: IntelliSense in Visual Studio 2010?
It's actually really, really bad with VS2010, I *had* to disable the Intellisense error checking which wasn't necessary with VS6 or VS2008 Express. It has a lot of trouble with gcc specific code and the newlib headers seem to be spectacularly problematic.
-
- Posts: 3
- Joined: Wed Oct 27, 2010 6:51 am
Re: IntelliSense in Visual Studio 2010?
So it seems I'm out of luck then. Oh well, I'll just disable error checking when I work with it. It could always be worse.
Thanks anyway, guys. I appreciate it.
Thanks anyway, guys. I appreciate it.
-
- Posts: 3
- Joined: Sun Feb 05, 2012 1:28 pm
Re: IntelliSense in Visual Studio 2010?
Sorry to resurrect an old topic, but I felt I had to provide my two cents.
A lot of the Intellisense errors come from the statements at struct definitions.
An easy fix for those is to go to ndstypes.h and change the line
into In doing so, Visual studio will define PACKED as empty, while the NDS toolchain will see the proper statements.
You will then need to find all statements and replace them with PACKED
Unfortunately, this doesn't fix all errors; VS2010 can't find stdbool.h, for example,, but it's a start.
fixing the "identifier 'deprecated' is undefined" errors is roughy the same as for the PACKED statements; replacewith DEPRECATED
in all headers, and add to ndstypes.h
This leaves me with just 4 Intellisence errors, of which one is the lack of stdbool.h, another for _ansi.h, and two are for "C" linkage errors.
A lot of the Intellisense errors come from the
Code: Select all
__attribute((__packed__))
An easy fix for those is to go to ndstypes.h and change the line
Code: Select all
#define PACKED __attribute__ ((__packed__))
Code: Select all
#if _MSC_VER
#define PACKED
#else
#define PACKED __attribute__ ((__packed__))
#endif
You will then need to find all
Code: Select all
__attribute((__packed__))
Unfortunately, this doesn't fix all errors; VS2010 can't find stdbool.h, for example,, but it's a start.
fixing the "identifier 'deprecated' is undefined" errors is roughy the same as for the PACKED statements; replace
Code: Select all
__attribute__((deprecated))
in all headers, and add
Code: Select all
#if _MSC_VER
#define DEPRECATED
#else
#define DEPRECATED __attribute__ ((deprecated))
#endif
This leaves me with just 4 Intellisence errors, of which one is the lack of stdbool.h, another for _ansi.h, and two are for "C" linkage errors.
Who is online
Users browsing this forum: No registered users and 1 guest