Before logging an issue, please update to the latest release of Visual Micro from the Downloads Page.

When Logging a Support Issue in the Forum, please ensure you have also:-

  • Enabled vMicro > Compiler > Show Build Properties
  • Re-Compile your program with these settings enabled
 
Save the new Output to a Text File and....
  • Click the Reply button and attach as .txt file OR
  • Click here to Email us with the file attached, and a link to your post
Support requests without the output above may be impossible to answer, so please help us to help you
 
Page Index Toggle Pages: 1 [2]  Send TopicPrint
Very Hot Topic (More than 25 Replies) std::function... shows red waved line (Read 13787 times)
Red Baron
Member
***
Offline


Posts: 106
Location: Germany
Joined: Jul 29th, 2015
Re: std::function... shows red waved line
Reply #20 - Apr 28th, 2018 at 4:50pm
Print Post  
Another fact: compiling works with absolute paths like  -I"C:\Users\Ulli\Documents\Arduino\libraries\UrsWiFi\src"
  
Back to top
 
IP Logged
 
Tim@Visual Micro
Administrator
*****
Offline


Posts: 12071
Location: United Kingdom
Joined: Apr 10th, 2010
Re: std::function... shows red waved line
Reply #21 - Apr 28th, 2018 at 9:36pm
Print Post  
Thanks for sending the files.

Yes, the intellisense is just standard vs c++ with some overrides that visual micro forces, the compile is handled by visual micro. Visual studio doesn't know about some of the underlying gcc code. Hopefully visual studio will become easier to extend languages in without huge development work.

The re-scan tool chains just re-reads the hardware and board info and is unrelated to any projects

The refresh of each projects intellisense, if it has changed, is supposed to happen automatically when major events happen such as build, saving changed code, change board etc.

Each projects can only have one set of intellisense paths.

If you have a project where the intellisense is wrong, then change to another board then the intrellisense should change for that board. If it does and then you switch back to the original (broken) board, if the intellisense does not correct itself then it might be the vs intellisense database is corrupt. In that case close the solution and delete the .vs folder from where the solution exists.
  
Back to top
WWW  
IP Logged
 
Red Baron
Member
***
Offline


Posts: 106
Location: Germany
Joined: Jul 29th, 2015
Re: std::function... shows red waved line
Reply #22 - Apr 30th, 2018 at 9:13am
Print Post  
Today, I switched to VS 2017. That solved the problem.
  
Back to top
 
IP Logged
 
Tim@Visual Micro
Administrator
*****
Offline


Posts: 12071
Location: United Kingdom
Joined: Apr 10th, 2010
Re: std::function... shows red waved line
Reply #23 - Apr 30th, 2018 at 12:55pm
Print Post  
Thanks for the note. I will re-test VS2015 but 2017 is probably better going forward.
  
Back to top
WWW  
IP Logged
 
ceepee
Newbies
*
Offline


Posts: 3
Joined: Mar 6th, 2020
Re: std::function... shows red waved line
Reply #24 - Mar 6th, 2020 at 3:55pm
Print Post  
Sorry for the necro, but I still have this problem with VS2019. I tried rebuilding, adding "#include <functional>" (and several others), deleting the __vm folder, changing board types (and archs), creating a new project with the same files, adding "-std=gnu++11" to the cpp flags.

I'm at a loss here. I cannot get the intellisense to work with std::function. Compiling works like a charm though. 

(And by the way: A huge thanks for this great plugin!)

edit#1: Added screenshot of intellisense error popup.

edit#2: I saw the referenced "functional" file in External Dependencies is "..\libraries\ArduinoSTL\src\functional" which indeed does not define the std::function I want to use. I guess it should be a506\xtensa-lx106-elf\include\c++\4.8.2\functional"?
« Last Edit: Mar 6th, 2020 at 4:30pm by ceepee »  

Please Register or Login to the Forum to see File Attachments
Back to top
 
IP Logged
 
Tim@Visual Micro
Administrator
*****
Offline


Posts: 12071
Location: United Kingdom
Joined: Apr 10th, 2010
Re: std::function... shows red waved line
Reply #25 - Mar 7th, 2020 at 11:19pm
Print Post  
We will shortly add intellisense paths using a more intelligent system. If you can proe what paths are needed for the version of esp you are using we can add them.

Add a local board.txt to the project manually or using the vMicro "Add Code" menu. Add a property called vm.intellisense.add-paths= with a semi-colon list of additional paths, hard code or use any build variable. For example...

Code
Select All
-elf\include\c++\4.8.2\functional 



Then click build, then see if intellisense is improved. 

« Last Edit: Mar 7th, 2020 at 11:59pm by Tim@Visual Micro »  
Back to top
WWW  
IP Logged
 
ceepee
Newbies
*
Offline


Posts: 3
Joined: Mar 6th, 2020
Re: std::function... shows red waved line
Reply #26 - Mar 8th, 2020 at 5:44pm
Print Post  
That helps indeed, thanks!

Would it make sense to to just add the whole folder like this?
Code
Select All
-elf\include\c++\4.8.2 



Anyway, glad to hear you're working on improving irritiating intellisense stuff like this, even if it's just a minor annoyance Smiley
  
Back to top
 
IP Logged
 
Tim@Visual Micro
Administrator
*****
Offline


Posts: 12071
Location: United Kingdom
Joined: Apr 10th, 2010
Re: std::function... shows red waved line
Reply #27 - Mar 8th, 2020 at 5:46pm
Print Post  
It might well do. Can you give it a try?
  
Back to top
WWW  
IP Logged
 
ceepee
Newbies
*
Offline


Posts: 3
Joined: Mar 6th, 2020
Re: std::function... shows red waved line
Reply #28 - Mar 8th, 2020 at 5:50pm
Print Post  
Oh yeah sorry, forgot to mention it works. I was not sure if I might shoot myself in the foot with it in some other way though.
  
Back to top
 
IP Logged
 
Tim@Visual Micro
Administrator
*****
Offline


Posts: 12071
Location: United Kingdom
Joined: Apr 10th, 2010
Re: std::function... shows red waved line
Reply #29 - Mar 8th, 2020 at 5:51pm
Print Post  
That's useful thanks but I was hoping that you would be able to answer the latter part of your last statement  Smiley
« Last Edit: Mar 8th, 2020 at 5:51pm by Tim@Visual Micro »  
Back to top
WWW  
IP Logged
 
Tim@Visual Micro
Administrator
*****
Offline


Posts: 12071
Location: United Kingdom
Joined: Apr 10th, 2010
Re: std::function... shows red waved line
Reply #30 - Mar 8th, 2020 at 6:17pm
Print Post  
I look at this and it was actually an oversight. The path for the older tool chain was supposed to be in the intellisense list already. If you had been using recent esp32 toolchains they come with 5.2.0 which is catered for.
  
Back to top
WWW  
IP Logged
 
Page Index Toggle Pages: 1 [2] 
Send TopicPrint