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 Multiple same libraries issue (Read 1665 times)
IanJohnston
Junior Member
**
Offline


Posts: 15
Joined: Jun 22nd, 2024
Multiple same libraries issue
Jun 24th, 2024 at 5:26pm
Print Post  
My original Arduino IDE Libraries folder is pretty big. Maybe un-tidy!
I have a project that is not compiling under VM (but is ok under Arduino IDE).
Under VM I seem to be getting some NtpClient errors on build.

Looking at the Arduino IDE 1.8.19 build info, I see:-

Multiple libraries were found for "NtpClientLib.h"
Used: C:\Program Files (x86)\arduino-1.8.19\libraries\NtpClientLib-2.5.0
Not used: C:\Program Files (x86)\arduino-1.8.19\libraries\NtpClient-master


How does VM make the same decision, or is there a way to force VM to use a specific library.......or do I need to tidy up my Library folder and get rid of these duplicates?

Thanks,

Ian.
  
Back to top
IP Logged
 
Simon@Visual Micro
Administrator
*****
Offline


Posts: 2695
Joined: Feb 13th, 2019
Re: Multiple same libraries issue
Reply #1 - Jun 24th, 2024 at 7:45pm
Print Post  
Thanks for the report.

Visual Micro should be making the same decision as the Arduino IDE, using the same decision tree from their specification.

Can you confirm that both are the same library (just one downloaded from GitHub directly I assume)?

Could you also confirm which library it is (either the GitHub URL or attach the library.properties file from it so we can replicate the issue?

Could you also attach the verbose build log from Visual Micro for us to review as well?
  
Back to top
IP Logged
 
IanJohnston
Junior Member
**
Offline


Posts: 15
Joined: Jun 22nd, 2024
Re: Multiple same libraries issue
Reply #2 - Jun 25th, 2024 at 11:58am
Print Post  
I have sorted out the duplicate NTP lib, one was an older version (the not-used one) so have removed it from my VM library folder.

Trying another build I get lots of errors, but nothing directly related to my code.
This is quite a big project (for me), consisting of quite a few libs:
#include <ModbusMaster.h>
#include <Wire.h>
#include <ACROBOTIC_SSD1306.h>
#include <TimeLib.h>
#include <NtpClientLib.h>
#include <ESP8266HTTPClient.h>
#include <ESP8266WiFi.h>
#include <ESP8266mDNS.h>
#include <Pinger.h>
#include <TimedAction.h>
#include <math.h>

No errors highlighted under VS in any of my .INO's.

There's quite a number of options for the BOARD type, I think I had matched them up in VM.

Attached is the successful Arduino IDE build info, and the failed VM build one.

Ian.
  

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


Posts: 2695
Joined: Feb 13th, 2019
Re: Multiple same libraries issue
Reply #3 - Jun 25th, 2024 at 12:19pm
Print Post  
Thanks for the detail and the update.

Can you attach a screenshot of the vMicro > General > IDE Locations Screen with the Arduino 1.6/1.8 IDE selected for us to review?


  
Back to top
IP Logged
 
IanJohnston
Junior Member
**
Offline


Posts: 15
Joined: Jun 22nd, 2024
Re: Multiple same libraries issue
Reply #4 - Jun 25th, 2024 at 1:25pm
Print Post  
Simon@Visual Micro wrote on Jun 25th, 2024 at 12:19pm:
Thanks for the detail and the update.

Can you attach a screenshot of the vMicro > General > IDE Locations Screen with the Arduino 1.6/1.8 IDE selected for us to review?


As attached.

Ian.
  

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


Posts: 2695
Joined: Feb 13th, 2019
Re: Multiple same libraries issue
Reply #5 - Jun 25th, 2024 at 1:37pm
Print Post  
Thanks for the screenshot.

From this and the logs, Visual Micro has been configured differently to the Arduino IDE, which could explain most of the issues in the compilation, and decisions made on which libraries to use, as well as the different ESP8266 board package in use by each IDE.

Could you try:
1) Updating the Optional Physical folder for Downloaded Board packages to:
C:\Program Files (x86)\arduino-1.8.19\portable

2) Amend the Sketchbook Location to the same as the Arduino IDE is using:
C:\Program Files (x86)\arduino-1.8.19\portable\sketchbook

After this click vMicro > General > Rescan Toolchains and Libraries so it refreshes all board and library information.

Then if you click Build > Clean Solution, and recompile again, it should yield the same result as the Arduino IDE.

I believe when portable mode is in use the overrides should not be needed at all, however having them there will ensure it is looking in the same places while we work through this issue.
« Last Edit: Jun 25th, 2024 at 1:38pm by Simon@Visual Micro »  
Back to top
IP Logged
 
IanJohnston
Junior Member
**
Offline


Posts: 15
Joined: Jun 22nd, 2024
Re: Multiple same libraries issue
Reply #6 - Jun 25th, 2024 at 3:40pm
Print Post  
Hi,

Set as follows:
  Packages = C:\Program Files (x86)\arduino-1.8.19\portable
  Sketchbook = C:\Program Files (x86)\arduino-1.8.19\portable\sketchbook
This worked, able to compile.

Changed to:
  Packages = C:\Program Files (x86)\arduino-1.8.19\portable
  Sketchbook = D:\Visual Studio Arduino
This worked, able to compile.

So, looks like VM is working for me now........except an ESP32 project where some of the API commands (no library req'd) are not being recognized......I'll post separately for that once I have explored and understood it more. - Original ESP32 core is out of date, needs re-writing for new core..

Thanks again.

Ian.
« Last Edit: Jun 25th, 2024 at 7:20pm by IanJohnston »  
Back to top
IP Logged
 
Page Index Toggle Pages: 1
Send TopicPrint