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 Deep Search failing for ESP32 - Wire.h (Read 3453 times)
Wheeling
Newbies
*
Offline


Posts: 3
Joined: Dec 19th, 2018
Deep Search failing for ESP32 - Wire.h
Dec 19th, 2018 at 9:16pm
Print Post  
Trying to build an ESP32 project. I get an error including <Wire.h> . See the barebones sketch below. I recreated the error on a completely new virtual Windows 10 machine with Arduino IDE 1.8.8, VS2017 Pro and Virtual Micro 1811.24.0. I installed ESP32 board support via Arduino IDE. I must be doing something fundamentally wrong - I just can't see it.

The barebones project compiles under the Arduino IDE

I turned on various debug options and noted "Core Include Paths" did not include the actual path to the ESP32 location of Wire.h 

The Wire library encountered an unknown path resolve error.c*: 30:17: fatal error: twi.h: No such file or directory
   compilation terminated

#include <Wire.h>
void setup(){}
void loop(){}
« Last Edit: Dec 20th, 2018 at 1:35pm by Wheeling »  

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


Posts: 12163
Location: United Kingdom
Joined: Apr 10th, 2010
Re: Deep Search failing for ESP32 - Wire.h
Reply #1 - Dec 20th, 2018 at 8:01pm
Print Post  
Thanks for the output.

Your system is picking up a wire library that you have installed into mydocument\arduino\libraries. If you delete the Wire folder and then click Rescan or restart the ide I think it will be okay.
c:\users\fhayes\OneDrive - OHEA\documents\Arduino\libraries\Wire

In the arduino world libraries are found by name you can not set a specific path (unless you add a shared library to your project). If you already have a shared Wire project in your solution you should right click > "Remove" it.

The master arduino library folders are
  MyDocuments\Libraries
  Hardware\Libraries
  IDE\LIbraries

Libraries in MyDocuments override everything yet you want to use the Wire from the hardware folder which for me was
C:\Users\[your 



  
Back to top
IP Logged
 
Wheeling
Newbies
*
Offline


Posts: 3
Joined: Dec 19th, 2018
Re: Deep Search failing for ESP32 - Wire.h
Reply #2 - Dec 21st, 2018 at 7:41pm
Print Post  
"Physician, Heal Thyself"
Thank you for your quick supply.
It must have been the issue you noted -  the extra copy of Wire library not under a board specific location.

Simple sketch that includes <Wire.h> now compile under VS2017/Visual Micro.

I was convinced that it was something that I was doing wrong. I spun up another virtual machine with Arduino, VS2017 and Visual Micro. This test machine worked - which proved that it was something I did wrong.  I then went back to the failed laptop and uninstalled Arduino and Visual Micro. I deleted folders: %userprofile%/appdata/local/Arduino15, c:\program files (x86)\Arduino and %userprofile%\documents\Arduino. (I saved sketches of interest). I reinstalled the tools and verified correct operation of VS2017 with a simple sketch that included  <Wire.h>

This thread can be closed.
Again, thank you for your reply and assistance.
  
Back to top
 
IP Logged
 
Page Index Toggle Pages: 1
Send TopicPrint