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
Hot Topic (More than 8 Replies) Visual studio libraries link source. Question [SOLVED] (Read 3054 times)
Geizer
Newbies
*
Offline


Posts: 6
Joined: Apr 2nd, 2021
Visual studio libraries link source. Question [SOLVED]
Apr 5th, 2021 at 11:11pm
Print Post  
Hello everyone!
I have a question about libraries including. 
I have used VS2019 with plugin visual micro before and it was OK. So I had to change my OS, after this i put again VS and VM plugin. So now i had a little problem... 
Earlier i used the link to AVR libs in my project, for example, like 
   #include <EEPROM.h>                ( its AVR libs, not arduino libs ). 
But now the compiler return me an error , and write it didnt find this libs. So i must write full link on a disk. 
   #include <C:\Program files(x86)\Arduino\hardware\arduino\avr\libraries\EEPROM\src\EEPROM.h>
I suffered for a long time, I thought that the problem was something else, before i guess about full link.
Best regards, Stas  Smiley
« Last Edit: Apr 7th, 2021 at 5:35pm by Geizer »  
Back to top
 
IP Logged
 
Tim@Visual Micro
Administrator
*****
Offline


Posts: 12076
Location: United Kingdom
Joined: Apr 10th, 2010
Re: Visual studio libraries link source. Question
Reply #1 - Apr 6th, 2021 at 12:29am
Print Post  
Hi

It is not valid to use paths with Arduino library #includes. The problem is most likely related to configuration such as if you have the No IDE option selected, or an Installed IDE and which board type is selected. 

Please provide the information requested in the yellow box above so we can see your config. Then the answer should be easy.

Thanks
« Last Edit: Apr 6th, 2021 at 12:30am by Tim@Visual Micro »  
Back to top
WWW  
IP Logged
 
Geizer
Newbies
*
Offline


Posts: 6
Joined: Apr 2nd, 2021
Re: Visual studio libraries link source. Question
Reply #2 - Apr 6th, 2021 at 5:02pm
Print Post  
Thank you for reply.

But i didnt understand which yellow box do You mean.
About IDE: i chose "Arduino 1.6/1.8" the source link is correct.  In Arduino IDE the project is compiling right same without full link.



UPD: with 

Code (C++)
Select All

#include <EEPROM.h>
#include <iarduino_RTC.h>
#include <LiquidCrystal_I2C.h>
#include <Wire.h> 



Code
Select All
Compiling debug version of 'Sketch1' for 'Arduino Uno'

Sketch1.ino: In function void setup()
Error compiling project sources

Sketch1.ino: 275:8: error: 'class EEPROMClass' has no member named 'put
Debug build failed for project 'Sketch1'

Sketch1.ino: 278:8: error: 'class EEPROMClass' has no member named 'put

Sketch1.ino: 279:8: error: 'class EEPROMClass' has no member named 'put
   sei()

Sketch1.ino: 284:8: error: 'class EEPROMClass' has no member named 'get
   EEPROM.get(dayStruct.addr_all_value, dayStruct.all_value)
   ^~~

Sketch1.ino: 285:8: error: 'class EEPROMClass' has no member named 'get
   EEPROM.get(dayStruct.addr_mon_value, dayStruct.mon_value)
   ^~~

Sketch1.ino: 286:8: error: 'class EEPROMClass' has no member named 'get
   EEPROM.get(dayStruct.addr_tue_value, dayStruct.tue_value)
   ^~~

Sketch1.ino: 287:8: error: 'class EEPROMClass' has no member named 'get
   EEPROM.get(dayStruct.addr_wed_value, dayStruct.wed_value)
   ^~~

Sketch1.ino: 288:8: error: 'class EEPROMClass' has no member named 'get
   EEPROM.get(dayStruct.addr_thu_value, dayStruct.thu_value)
   ^~~

Sketch1.ino: 289:8: error: 'class EEPROMClass' has no member named 'get
   EEPROM.get(dayStruct.addr_fri_value, dayStruct.fri_value)
   ^~~

Sketch1.ino: 290:8: error: 'class EEPROMClass' has no member named 'get
   EEPROM.get(dayStruct.addr_sat_value, dayStruct.sat_value)
   ^~~

Sketch1.ino: 291:8: error: 'class EEPROMClass' has no member named 'get
   EEPROM.get(dayStruct.addr_sun_value, dayStruct.sun_value)
   ^~~

Sketch1.ino: 292:8: error: 'class EEPROMClass' has no member named 'get

Sketch1.ino: 293:8: error: 'class EEPROMClass' has no member named 'get
   sei()

Sketch1.ino: In function void loop()

Sketch1.ino: 586:8: error: 'class EEPROMClass' has no member named 'put

Sketch1.ino: 666:8: error: 'class EEPROMClass' has no member named 'put

Sketch1.ino: 672:8: error: 'class EEPROMClass' has no member named 'put

Sketch1.ino: 893:8: error: 'class EEPROMClass' has no member named 'put
   break
   ^~~

Sketch1.ino: 949:8: error: 'class EEPROMClass' has no member named 'put

Sketch1.ino: 1057:8: error: 'class EEPROMClass' has no member named 'put
   break
   ^~~

Sketch1.ino: 1112:8: error: 'class EEPROMClass' has no member named 'put
   break
   ^~~

Sketch1.ino: 1167:8: error: 'class EEPROMClass' has no member named 'put
   break
   ^~~

Sketch1.ino: 1222:8: error: 'class EEPROMClass' has no member named 'put
   break
   ^~~

Sketch1.ino: 1277:8: error: 'class EEPROMClass' has no member named 'put
   break
   ^~~
 


« Last Edit: Apr 6th, 2021 at 5:09pm by Geizer »  
Back to top
 
IP Logged
 
Tim@Visual Micro
Administrator
*****
Offline


Posts: 12076
Location: United Kingdom
Joined: Apr 10th, 2010
Re: Visual studio libraries link source. Question
Reply #3 - Apr 6th, 2021 at 5:16pm
Print Post  
The attached image should show a duplicate of what you can see near the top of this page?
  

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


Posts: 6
Joined: Apr 2nd, 2021
Re: Visual studio libraries link source. Question
Reply #4 - Apr 6th, 2021 at 9:45pm
Print Post  
Sorry for i make you write about this Build properties  Smiley I understand that you write about this in many themes again and again... Roll Eyes

I've attached 2 files, with error and without error. 

So as i understoood visual micro try to find libs in a %Users%/Documents/Arduino/libraries instead in C:/Program files(x86)/Arduino... But i don't know how to change it, or make to find from 2 places and rewrite from main folder.
« Last Edit: Apr 6th, 2021 at 9:54pm by Geizer »  

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: Visual studio libraries link source. Question
Reply #5 - Apr 6th, 2021 at 10:01pm
Print Post  
Great thanks. Yes, this folder is called the "Arduino sketchbook libraries" folder, adding libraries to the folder are treated as overrides but there are a few eceptions.

Please post the library.properties file found in this folder.
C:/Users/Scientist/Documents/Arduino/libraries/EEPROM

Then remove or rename the folder. After that click "vMicro>general>reload toolchains" or restart the ide.

When we see your library properties we will know if the EEPROM from sketchbook libraries has been detected for valid reason or not.

After we resolve the issue we can also discuss an easier way to use specific arduino libraries and different versions of the same library within different projects. generally arduino is weak in this area but visual micro does offer some useful extras. However let's make it work the way it should first.

Thanks
  
Back to top
WWW  
IP Logged
 
Geizer
Newbies
*
Offline


Posts: 6
Joined: Apr 2nd, 2021
Re: Visual studio libraries link source. Question
Reply #6 - Apr 7th, 2021 at 3:08pm
Print Post  
But there are no libraries.properties... Huh

Do I need to compile the project in Arduino IDE? to create this file?
  
Back to top
 
IP Logged
 
Tim@Visual Micro
Administrator
*****
Offline


Posts: 12076
Location: United Kingdom
Joined: Apr 10th, 2010
Re: Visual studio libraries link source. Question
Reply #7 - Apr 7th, 2021 at 3:15pm
Print Post  
No that's fine. It just means it is an old format library (v1 format). 

I suggest you remove it. It does not contain the methods you are trying to use in your code. Then we will fallback to the version included with the toolchain.

We will try this in the arduino ide to see what priority it gives to that combination of libraries.
  
Back to top
WWW  
IP Logged
 
Geizer
Newbies
*
Offline


Posts: 6
Joined: Apr 2nd, 2021
Re: Visual studio libraries link source. Question
Reply #8 - Apr 7th, 2021 at 4:13pm
Print Post  
Yeah. It works when i've remove folder with libraries: "%USERS%/Documents/Arduino/libraries".

So Visual Micro have parameters from Arduino IDE. But Arduino IDE can rewrite libs, but VM cant?
  
Back to top
 
IP Logged
 
Tim@Visual Micro
Administrator
*****
Offline


Posts: 12076
Location: United Kingdom
Joined: Apr 10th, 2010
Re: Visual studio libraries link source. Question
Reply #9 - Apr 7th, 2021 at 4:58pm
Print Post  
No, this is how the Arduno IDE works. 

We have retested this and both the Arduino IDE and Visual Micro use the same logic to discover libraries.

When downloading a library youself it will be placed in your sketch book libraries folder. Libraries in that folder override the ones provided by the hardware or ide if the libraries have the same architecture specification. 

Does this make sense?
  
Back to top
WWW  
IP Logged
 
Geizer
Newbies
*
Offline


Posts: 6
Joined: Apr 2nd, 2021
Re: Visual studio libraries link source. Question
Reply #10 - Apr 7th, 2021 at 5:34pm
Print Post  
Hah) OK. Thank you...)  Oh, this Arduino IDE... Grin

I think the problem is solved

Thank you again for the detailed answer.
  
Back to top
 
IP Logged
 
Tim@Visual Micro
Administrator
*****
Offline


Posts: 12076
Location: United Kingdom
Joined: Apr 10th, 2010
Re: Visual studio libraries link source. Question [SOLVED]
Reply #11 - Apr 8th, 2021 at 4:24pm
Print Post  
Great, in the future take a look at the shared library projects in Visual Micro. That allows you to take any arduino library, put it wherever you want. Each Visual Micro projects can then Reference that specific library, instead of using the Arduino rules. 

With libraries as shared projects, the library code stays the same, your own code stays the same but you get to decide the specific library location for each project. Obviously the arduino IDE will still use the original library location, therefore you loose compatibility with the Arduino IDE.
  
Back to top
WWW  
IP Logged
 
Page Index Toggle Pages: 1
Send TopicPrint