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 Send TopicPrint
Normal Topic inconsistent Arduino/libraries being seen by the IDE? (Read 1894 times)
PoutinePlatter
Junior Member
**
Offline


Posts: 23
Joined: Jun 16th, 2019
inconsistent Arduino/libraries being seen by the IDE?
Jul 28th, 2019 at 2:38pm
Print Post  
Weird thing just started happening last couple days, unfortunately I upgraded through a few versions during this time and can't say which version it started happening with...

The IDE suddenly does not seem to 'see' some (many/most?) library header files... Either under user/Documents/Arduino/libraries, or 
Programs/Arduino/hardware/teensy/libraries, or
Programs/Arduino/libraries

These were all working fine before exactly as-is. 

All the header files are there, exactly where they always were, and look fine. 

Note in screenshots that one (IFCT) library works fine, while many/most others are not found.  I'm at a loss to explain that bit. 

Actual compilation seems to work fine, but Intellisense errors/prompting/validation etc. are all broken now. 

If I fully qualify the libraries, aka:
Code
Select All
#include <SPI/SPI.h>
#include <Wire/Wire.h>
#include <Adafruit_SSD1306/Adafruit_SSD1306.h>
#include <Adafruit_GFX/Adafruit_GFX.h>
#include <Adafruit_GFX/Fonts/FreeMono9pt7b.h>
#include <Bounce2/Bounce2.h> 



Then they all work again... but that's pretty ugly and non-standard... 

Suggestions?
  

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


Posts: 12076
Location: United Kingdom
Joined: Apr 10th, 2010
Re: inconsistent Arduino/libraries being seen by the IDE?
Reply #1 - Jul 28th, 2019 at 2:54pm
Print Post  
Please remove the paths from #includes and build after following the request in the yellow box above. Then post the .txt as requested

Also confirm if you see the libraries in the libraries menu drop down lists?

Thanks
« Last Edit: Jul 28th, 2019 at 4:34pm by Tim@Visual Micro »  
Back to top
WWW  
IP Logged
 
PoutinePlatter
Junior Member
**
Offline


Posts: 23
Joined: Jun 16th, 2019
Re: inconsistent Arduino/libraries being seen by the IDE?
Reply #2 - Jul 28th, 2019 at 3:21pm
Print Post  
Tim@Visual Micro wrote on Jul 28th, 2019 at 2:54pm:
Please remove the paths and build after following the request in the yellow box above.


EDIT:  Was about to post: 

Will do when I can - ATM I am mid-refactor and there'd be red-herring errors from incomplete code... So I either need to finish some edits or just go make a test project for you to show same behavior. 


But then I closed the project, opened an old test project I've used with you before, and... it all worked fine.   
Closed that, opened a 2nd 'real' project that is known-good/untouched... looked fine... Closed that... Reopened the main project.. 

Working now. 

Weird. 

Tim@Visual Micro wrote on Jul 28th, 2019 at 2:54pm:

Also confirm if you see the libraries in the libraries menu drop down lists?


Yes absolutely everything looks fine.  I should add I clicked "Re-scan" multiple times etc. 

"Never mind!" I guess.  Thanks!  Roll Eyes
  
Back to top
 
IP Logged
 
PoutinePlatter
Junior Member
**
Offline


Posts: 23
Joined: Jun 16th, 2019
Re: inconsistent Arduino/libraries being seen by the IDE?
Reply #3 - Jul 28th, 2019 at 3:38pm
Print Post  
OK. 

  1. And after that suddenly all Serial calls were being flagged as unknown by Intellisense. Despite no Serial #include being required as it comes from usb_serial.h which is included by the platform. 
  2. Closed/re-opened, that went away. 
  3. But then an error about SPI/SPI.h not being found. Despite the fact that I removed the #include line.  Intellisense is continuing to report an error about a line that no longer exists. 
  4. Then some Platform Toolset Error MSB8038 Platform Toolset is not defined has appeared.  See screenshot. 


I wonder if something is corrupted here.  Let me do a Clean Build see what happens.   

EDIT - errrr... OK can't post screenshot, suddenly says I'm not allowed....  Did you revoke my right to do that?
  
Back to top
 
IP Logged
 
Tim@Visual Micro
Administrator
*****
Offline


Posts: 12076
Location: United Kingdom
Joined: Apr 10th, 2010
Re: inconsistent Arduino/libraries being seen by the IDE?
Reply #4 - Jul 28th, 2019 at 3:44pm
Print Post  
The toolset issue means that VS is trying to build because visual micro doesn't think it should be managing the project.

Visual micro is setup correctly and can find the libraries. There is no need to rescan.

1)
Do the project name, the containing folder name and an .ino name match?

2)
After you see a build error, do you see a "Micro Build" output window in the output window drop down list?


Please answer both questions. Thanks

  
Back to top
WWW  
IP Logged
 
PoutinePlatter
Junior Member
**
Offline


Posts: 23
Joined: Jun 16th, 2019
Re: inconsistent Arduino/libraries being seen by the IDE?
Reply #5 - Jul 28th, 2019 at 4:11pm
Print Post  
Tim@Visual Micro wrote on Jul 28th, 2019 at 3:44pm:
1)
Do the project name, the containing folder name and an .ino name match?


Yes. Solution = Project = .ino = Folder (I'm aware of that Ardoodoo requirement).  

These might not matter but I'll mention them anyway:
- Project name is essentially Foo_Bar.2 therefore Foo_Bar.2.vcxproj/sln/ino .  Not sure if the extra '.' or underscore could be an issue?   
- I had a pre-refactor backup copy of the folder called "Foo_Bar.2 - Copy" (auto windows copy naming). I've since renamed in case some folder masking was confusing that. 

Neither of those things are new however, its had that name for 2 months and made the backup copy about a week or 2 ago.  The #include weirdness is new. 

Tim@Visual Micro wrote on Jul 28th, 2019 at 3:44pm:
2)
After you see a build error, do you see a "Micro Build" output window in the output window drop down list?


Yep.  All is normal there. Like I said the actual builds seem to go fine and see libraries fine, its an Intellisense IDE issue. 

OK:

Just closed and re-opened the project (using "Open Existing Arduino project") and all the old errors about #include statements and any name symbols from them being unrecognized are back again.  That exact same screenshot list of libraries is not being seen by Intellisense again.  i.e. Adafruit, Bounce2, etc. etc. all throwing a load of IS errors.  

The Platform error is gone, however. 

Spent way too much time on a supposed Sunday day-off error-chasing and coding so I'm putting this away for now.  Will get back to it tomorrow. 

If there's any addition 'cleaning' steps I can take aside from Build:Clean and Project:Rescan, let me know, I wonder if some temp / hidden project data has gotten funked up? 

  
Back to top
 
IP Logged
 
Tim@Visual Micro
Administrator
*****
Offline


Posts: 12076
Location: United Kingdom
Joined: Apr 10th, 2010
Re: inconsistent Arduino/libraries being seen by the IDE?
Reply #6 - Jul 28th, 2019 at 4:34pm
Print Post  
Please remove the paths from #includes and build after following the request in the yellow box above. Then post the .txt as requested
  
Back to top
WWW  
IP Logged
 
PoutinePlatter
Junior Member
**
Offline


Posts: 23
Joined: Jun 16th, 2019
Re: inconsistent Arduino/libraries being seen by the IDE?
Reply #7 - Jul 29th, 2019 at 1:05pm
Print Post  
Tim@Visual Micro wrote on Jul 28th, 2019 at 4:34pm:
Please remove the paths from #includes


Already did that. 

And today I start VS2017 and no errors.  Working fine as it should have all along. 

Tim@Visual Micro wrote on Jul 28th, 2019 at 4:34pm:
and build after following the request in the yellow box above. Then post the .txt as requested


Will do if it pops up again. 

I somehow must assume some corruption or errors developed in some cached files.  VS2017 was restarted repeatedly yesterday as I struggled with this, however I did not restart the computer so perhaps something was fixed up by the reboot.
  
Back to top
 
IP Logged
 
Page Index Toggle Pages: 1
Send TopicPrint