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 include library error (Read 2745 times)
kasra75
Newbies
*
Offline


Posts: 1
Joined: Sep 1st, 2017
include library error
Sep 1st, 2017 at 2:50pm
Print Post  
Hello Everyone!!! 

here is my problem : 

with arduino IDE(1.8.3)
open arduino ide -> sketch -> add library -> library manager -> typin in "esp32 oled" -> select the library ->install 
in C:\Users\User\Documents\Arduino\libraries a new folder appears : ESP8266_Oled_Driver_for_SSD1306_display -> OK

( i know it's confusing but the library is compatible with esp32 even if in the name only esp8266 appears )
i tryed to achieve the same process with the new tool : 

with VS2017
visual micro explorer -> manage Libraries tab -> search for esp32 oled -> clikc on the founded library ->
i have then a pop up asking  me if i want to install the library , press OK  ->
in C:\Users\User\Documents\Arduino\libraries a new folder appears : ESP8266_Oled_Driver_for_SSD1306_display -> OK


now that i installed correctly the library let's play the example.
with arduino : files -> examples -> in the example folder of the library -> SSD1306SimpleDemo -> upload -> the demo is working -> OK

but in VS2017
->vMicro 
-> Open Existing Arduino Project 
-> i go to y\examples\SSD1306SimpleDemo folder
-> then select SSD1306SimpleDemo.ino 
but i had a red trait under "#include "SSD1306.h" that says : " can't open the sourcefile SSD1306.h" and of course a lot of other errors due to the use of linked methods.
i changed with :  #include <ESP8266_Oled_Driver_for_SSD1306_display\SSD1306.h> no more error and i have the intellisense for the object
->then "Build and Upload"
->SSD1306SimpleDemo.ino: 16:61: fatal error: ESP8266_Oled_Driver_for_SSD1306_display\SSD1306.h: No such file or directory compilation terminated


   
Could you please explain to me what i did wrong ?  and what to do for being able to make that example work .
 
i have another simple question : When a library is downloaded it goes to the C:\Users\User\Documents\Arduino\libraries folder   but when i go to 
vstudio -> 
Add Library -> under the " select a user installed library " list  i don't see the new library installed .
i rescan and reopen vs but nothing is updated . 
 
Could you please explain why ? and where the library is ?
 
thanks a lot !   
 
Kasra
  
Back to top
 
IP Logged
 
Tim@Visual Micro
Administrator
*****
Offline


Posts: 12076
Location: United Kingdom
Joined: Apr 10th, 2010
Re: include library error
Reply #1 - Sep 1st, 2017 at 9:15pm
Print Post  
Hi,

I think all of this is related to where your arduino sketchbook folder is located. 

The arduino sketchbook folder is normal "mydocuments\arduino"

Visual Micro downloads and installs libraries to the sketchbook\libraries folder.

The arduino ide does the same. They both should default to using the same location unless you have changed it.

If both arduino and visual studio are open at the same time then if you install a library in arduino then clicking "vmicro>general>rescan tool chains" (or restart ide)will make the library immediately available to visual micro. If you install a library in Visual Studio then you have to restart the arduino ide.

So let's make sure both ide's are using the default sketchbook folder.

In arduino file>preferences what is you sketch book folder path? It should be empty?

In visual studio "vmicro>visual micro explorer>ide locations" what is the "optional sketch book path". It should be empty?

Thanks

  
Back to top
WWW  
IP Logged
 
Page Index Toggle Pages: 1
Send TopicPrint