Visual Studio Ide for Arduino
https://www.visualmicro.com/forums/YaBB.pl
>> >> Intellisense showing VC++ std files rather than ESP32 std files.
https://www.visualmicro.com/forums/YaBB.pl?num=1538868599

Message started by Mark Leaming on Oct 7th, 2018 at 12:29am

Title: Intellisense showing VC++ std files rather than ESP32 std files.
Post by Mark Leaming on Oct 7th, 2018 at 12:29am
Tim,

Latest release fixes the linker issues I was having, thanks for that. 

I'm now seeing an issue with intellisense picking up Microsoft std:: includes (like memory) from C:\Program Files (x86)\Microsoft Visual Studio\2017\Enterprise\VC\Tools\MSVC\14.15.26726\include rather than from c:\users\m\Documents\Arduino\hardware\espressif\esp32\tools\xtensa-esp32-elf\xtensa-esp32-elf\include\c++\5.2.0

I'm using my laptop while traveling and not sure if this is a new issue or something with my configuration.

Is there a way for me to prevent the VC++ includes from being used by Intellisense?  :(

Title: Re: Intellisense showing VC++ std files rather than ESP32 std files.
Post by Visual Micro on Oct 7th, 2018 at 12:33pm
Thanks for the post.

This is fixed in the latest "work in progress" release here

Title: Re: Intellisense showing VC++ std files rather than ESP32 std files.
Post by Mark Leaming on Oct 8th, 2018 at 3:50pm
Thanks Tim.  :)

Title: Re: Intellisense showing VC++ std files rather than ESP32 std files.
Post by Mark Leaming on Oct 8th, 2018 at 6:29pm
Tim,

I upgraded to your work in progress, 1810.7.1 and I still have the issue with intellisense pulling in the Program Files(x86)\Microsoft Visual Studio\2017\Enterprise\VC\Tools\MSVC\… includes and not Arduino\hardware\espressif\esp32\tools\xtensa-esp32-elf includes.

Let me know if you need any more info.

-Mark

Title: Re: Intellisense showing VC++ std files rather than ESP32 std files.
Post by Visual Micro on Oct 9th, 2018 at 2:40pm
Did you do a build?

Title: Re: Intellisense showing VC++ std files rather than ESP32 std files.
Post by Mark Leaming on Oct 9th, 2018 at 3:18pm
Hi Tim,

Yes, I've done a build and there are some odd behaviors that I'm going to look at in that I got some errors related to inline methods that don't seem to be in the ESP32 files..  I'll reduce my program to it's simpliest bits and try again and let you know what I find.

I did find that going into project properties, VC++ Directories and remove "Inherit..." from the Include Directories and add the ESP32 directories I get the right intellisense for some things.

My simple test worked, so I'll chalk up my build issue to my code. 

-Mark

Title: Re: Intellisense showing VC++ std files rather than ESP32 std files.
Post by Mark Leaming on Oct 12th, 2018 at 12:32am
Tim,

How does this get set?  intellisense.include.paths={runtime.tools.xtensa-esp32-elf-gcc.path}\include\c++\5.2.0;{runtime.tools.xtensa-esp32-elf-gcc.path}\include;{runtime.tools.xtensa-esp32-elf-gcc.path}\include\include

It looks like it might be missing the extra folder that is hightligted:  {runtime.tools.xtensa-esp32-elf-gcc.path}xtensa-esp32-elf\include\c++\5.2.0\


Thanks,

Mark

Title: Re: Intellisense showing VC++ std files rather than ESP32 std files.
Post by Visual Micro on Oct 12th, 2018 at 12:41pm
Okay I'll add that thanks

It's set in the platform.txt that is shipped with visual micro

If you look at tools>options>visual micro>version>assembly you will see the path to visual micro. Below that is "\Micro Platforms" folder below that is \arduino16x and below that \esp32.

I'm thinking of adding support for platform IO because their database contains these paths where as the arduino system does not.

In platform.txt is the intellisense paths property. Altering the property doesn't affect builds, only intellisense.

Title: Re: Intellisense showing VC++ std files rather than ESP32 std files.
Post by Mark Leaming on Oct 12th, 2018 at 7:14pm
Nice, it looks like:  intellisense.include.paths={runtime.tools.xtensa-esp32-elf-gcc.path}\include\c++\5.2.0;{runtime.tools.xtensa-esp32-elf-gcc.path}\include;{runtime.tools.xtensa-esp32-elf-gcc.path}\include\include;{runtime.tools.xtensa-esp32-elf-gcc.path}\xtensa-esp32-elf\include;{runtime.tools.xtensa-esp32-elf-gcc.path}\xtensa-esp32-elf\include\c++\5.2.0;{runtime.tools.xtensa-esp32-elf-gcc.path}\xtensa-esp32-elf\include\c++\5.2.0\bits;{runtime.tools.xtensa-esp32-elf-gcc.path}\xtensa-esp32-elf\include\c++\5.2.0\xtensa-esp32-elf\bits

did the trick. :D

-Mark

Title: Re: Intellisense showing VC++ std files rather than ESP32 std files.
Post by Mark Leaming on Oct 12th, 2018 at 8:54pm
PlatformIO would be good as there are still some peculiarities with what I did above.

Title: Re: Intellisense showing VC++ std files rather than ESP32 std files.
Post by Visual Micro on Oct 20th, 2018 at 6:17pm
Visual studio intellisense might not ever be 100% correct because it uses the VC++ engine and not gcc.

What are the issues you see, it's good for me to investigate if possible.

ps: The next release does now have the paths you discovered.


Title: Re: Intellisense showing VC++ std files rather than ESP32 std files.
Post by Mark Leaming on Oct 20th, 2018 at 6:40pm
I’ll take a look and document my findings this afternoon.

Great to hear they will be in the next release.  :)

Title: Re: Intellisense showing VC++ std files rather than ESP32 std files.
Post by Mark Leaming on Oct 20th, 2018 at 7:19pm
Tim,

What I see is that I have a lot of "this declaration has no storage class or type specifier", "identifier xxx is undefined", "namespace "std" has no member "shared_ptr"", "exected a '{'" (when using std::function), and more (1120) intellisense errors.  This is after a clean and build of a project.  Everything builds fine so I've just been living with it.


-Mark

Title: Re: Intellisense showing VC++ std files rather than ESP32 std files.
Post by Visual Micro on Oct 21st, 2018 at 1:28pm
Thanks, yes intellisense and build are different. You can set the combo above the errors list to "Build Only" or the other combo to "Open documents only". That can help.

Title: Re: Intellisense showing VC++ std files rather than ESP32 std files.
Post by trevorH on Jan 11th, 2019 at 12:30am
I am having similar intellisense errors with the 1812.22 release, arduino 1.8.8 and adafruit ESP32 board.  Didn't have these errors previously (not sure which release though).  Identifier undefined (i believe these are due to not declaring functions at the top of the c++ document), incomplete type is not allowed (ESP32 SD card example) and after that function there are a lot of issues.  I think the namespace "fs" is defined in both SD.h and FS.h and intellisense is not looking in the correct location for the object FS.  Is the software not setup to work with these multiple namespace declarations?

Title: Re: Intellisense showing VC++ std files rather than ESP32 std files.
Post by enrique escyes on Jan 12th, 2019 at 10:30am
I have suffered this issue (intellisense gives errors but it's compiled correctly) The first time I fixed it by removing a library and the last time issue DISAPPEARED SIMPLY CHANGING THE ORDER OF THE LIBRARIES, I put the conflicting ones (FS.h and SD.h) in last place . I hope someone helps this.  :o

Title: Re: Intellisense showing VC++ std files rather than ESP32 std files.
Post by Visual Micro on Feb 8th, 2019 at 11:07pm
Sorry for the delay with this. The change to intellisense paths that resulted from this post has been reverted. This should revert the error list back to the september system which should work well for the current project files or open files without needing to limit the intellisense error reporting to "Build Only"

The release to the gallery has not been made yet but the version is available in the Pre-Release 2902.8 forum thread


Visual Studio Ide for Arduino » Powered by YaBB 2.5.2!
YaBB Forum Software © 2000-2019. All Rights Reserved.