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 ESP8266 project builds in Arduino but not in VS (Read 3484 times)
MendipAndy
Newbies
*
Offline


Posts: 4
Joined: Nov 20th, 2017
ESP8266 project builds in Arduino but not in VS
Nov 20th, 2017 at 2:42pm
Print Post  
My ESP build is unable to find include files from libraries.
I can build the same code in Arduino IDE just fine, whether it is for ESP or Arduino Uno.
But in VS+VM if I set the board to Arduino Uno it builds fine.
If I set it to any ESP variant the build fails at library header include. This is example test.ino contains just #include <LiquidCrystal_I2C.h> with empty setup() and loop().

Compiling 'Test' for 'WeMos D1(Retired)'
 
Test.ino: 2:31: fatal error: LiquidCrystal_I2C.h: No such file or directory
   #include <LiquidCrystal_I2C.h>
   compilation terminated

     An error was encountered during the 'Deep Search' library discovery process.
Build failed for project 'Test'


I have Arduino 1.8.5 installed.
Visual Studio 2015 community.
That library (if it matters) is the dfrobot I2CLCD lib here:-
https://github.com/marcoschwartz/LiquidCrystal_I2C

My sketchbook location in arduino is set to  "D:\SVN\Code\Arduino"
I have directories "libraries" and "Sketches" below this location. Everything builds just fine in Arduino IDE.
I have tried setting the same sketchbook location in vMicro but it does not help.
A similar setup but without a modified sketchbook location in Arduino setup works fine so it looks like it is something to do with this.
I tried duplicating all the library directories at the usual place (ie...documents/Arduino) but that did not help.
Rescan toolchain and libraries does not help.
Doing a rescan in Visual Micro Explorer does not help either.

Any suggestions?
« Last Edit: Nov 20th, 2017 at 4:58pm by MendipAndy »  
Back to top
 
IP Logged
 
MendipAndy
Newbies
*
Offline


Posts: 4
Joined: Nov 20th, 2017
Re: ESP8266 project builds in Arduino but not in VS
Reply #1 - Nov 20th, 2017 at 6:31pm
Print Post  
More on this.
Oddly it seems to be specific to THAT library. So nothing to do with arduino sketches path?

If I delete the "library.properties" file from that directory and force vMicro to rescan toolchain and libs then it builds fine. If I put the file back and then rescan then the next build fails again.

I don't see anything in that "libraries.properties" that ought to cause vMicro any problems.

I've attached the properties file here (with .txt extension added so it can upload) if anyone wants to take a look but the whole lib is also available from the github link in my previous post.
  

Please Register or Login to the Forum to see File Attachments
Back to top
 
IP Logged
 
MendipAndy
Newbies
*
Offline


Posts: 4
Joined: Nov 20th, 2017
Re: ESP8266 project builds in Arduino but not in VS
Reply #2 - Nov 20th, 2017 at 6:43pm
Print Post  
Ah-ha!
It looks like it is the achitectures line and a difference in how it is parsed by vMicro vs the Arduino IDE.

It seems that vMicro only accepts the library if the architectures match. This library has architecture marked as AVR so vMicro does not make it avilable in ESP builds.
But it looks like Arduino IDE still makes the library available to architectures that don't match, but offers a warning instead.

If I change that line from "architectures=AVR" to "architectures=*" then it builds OK (and yes, it runs OK too).

I wonder, perhaps vMicro's behaviour should be changed to be the same as Arduino IDE?  The Arduino docs say:-

"In 1.5.x+, libraries placed in the user’s sketchbook folder (in the libraries/ subfolder) will be made available for all boards"

From: https://github.com/arduino/Arduino/wiki/Arduino-IDE-1.5:-Library-specification
« Last Edit: Nov 20th, 2017 at 6:54pm by MendipAndy »  
Back to top
 
IP Logged
 
Tim@Visual Micro
Administrator
*****
Offline


Posts: 12163
Location: United Kingdom
Joined: Apr 10th, 2010
Re: ESP8266 project builds in Arduino but not in VS
Reply #3 - Nov 21st, 2017 at 2:37am
Print Post  
Thanks for the info I will look into it.
  
Back to top
IP Logged
 
Tim@Visual Micro
Administrator
*****
Offline


Posts: 12163
Location: United Kingdom
Joined: Apr 10th, 2010
Re: ESP8266 project builds in Arduino but not in VS
Reply #4 - Jan 28th, 2018 at 2:30am
Print Post  
In the next release of visual micro the architectures specified in each library.properties file is ignored because they are often wrong.

Both intellisense and build will allow any library for any architecture.

Thanks for the report.
  
Back to top
IP Logged
 
Tim@Visual Micro
Administrator
*****
Offline


Posts: 12163
Location: United Kingdom
Joined: Apr 10th, 2010
Re: ESP8266 project builds in Arduino but not in VS
Reply #5 - May 10th, 2018 at 11:22pm
Print Post  
This was resolved in January but your forum notifications were switched off.
  
Back to top
IP Logged
 
Page Index Toggle Pages: 1
Send TopicPrint