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] 2  Send TopicPrint
Very Hot Topic (More than 25 Replies) Cannot find user library (Read 21813 times)
khalilm
Junior Member
**
Offline


Posts: 17
Joined: Jan 6th, 2015
Cannot find user library
Jan 6th, 2015 at 5:52pm
Print Post  
IDE: Visual Studio Community Edition 2013
VisualMicro: Latest release build as of yesterday
Arduino IDE: 1.06

After installing MSVS and VM programs yesterday, I can see the core library files but the user library file option is grayed out. 

I have tried specifying the library location in the Configuration Manager (C:\Users\Khalil\Documents\Arduino) but that also does not work.

The library is located by the Arduino IDE and if I specifically map the library in the #include directive in MSVS, it also works.

The original library contained "-" but I copied it and renamed it and that didnt work either (I saw in the release notes that this was an issue previously).

At a loss as to why this is not working. I can work around it for now but is there something I am missing?

Thanks,
Khalil
  
Back to top
 
IP Logged
 
Tim@Visual Micro
Administrator
*****
Offline


Posts: 12191
Location: United Kingdom
Joined: Apr 10th, 2010
Re: Cannot find user library
Reply #1 - Jan 6th, 2015 at 7:02pm
Print Post  
Hi,

Yes it should be working and underscores in library names were resolved in the recent releases.

The current beta on the downloads page also includes a fix where by Arduino 1.5 format libraries were not showing on the add/import libraries menu but were compiling okay if the correct #includes were in the sketch.

I hope the beta (which is just an service pack) resolves the issue?

Thanks for the clear report.


ps: Yes, you are also using the default arduino sketch book location so there was no need to enter the location in the visual micro configuration dialog

  
Back to top
IP Logged
 
khalilm
Junior Member
**
Offline


Posts: 17
Joined: Jan 6th, 2015
Re: Cannot find user library
Reply #2 - Jan 6th, 2015 at 10:21pm
Print Post  
Hi Tim, 

Thanks for the quick reply. Installing the beta does fix the issue. I can now see the library in the Intellisense drop down and can reference it.

Just one other question, maybe I am not understanding the functionality of the software but should I not also see this library under the USER option in Project > Add/Import Sketch Library?

Thanks,
Khalil
« Last Edit: Jan 6th, 2015 at 10:22pm by khalilm »  
Back to top
 
IP Logged
 
Tim@Visual Micro
Administrator
*****
Offline


Posts: 12191
Location: United Kingdom
Joined: Apr 10th, 2010
Re: Cannot find user library
Reply #3 - Jan 7th, 2015 at 11:54am
Print Post  
Hi,

Please switch on tools>options>user interface>trace then re-start the ide

After startup you should see a trace in an output window

please copy and email to info [at] visualmicro.com

thanks
  
Back to top
IP Logged
 
Tim@Visual Micro
Administrator
*****
Offline


Posts: 12191
Location: United Kingdom
Joined: Apr 10th, 2010
Re: Cannot find user library
Reply #4 - Jan 7th, 2015 at 2:09pm
Print Post  
Thanks for the trace.

can you please confirm the full location of your user libraries folder

thanks
  
Back to top
IP Logged
 
khalilm
Junior Member
**
Offline


Posts: 17
Joined: Jan 6th, 2015
Re: Cannot find user library
Reply #5 - Jan 7th, 2015 at 2:58pm
Print Post  
I use the default Arduino location (Sketch > Import Library > Add Library) in Arduino:

C:\Users\Khalil\Documents\Arduino\Libraries
  
Back to top
 
IP Logged
 
Tim@Visual Micro
Administrator
*****
Offline


Posts: 12191
Location: United Kingdom
Joined: Apr 10th, 2010
Re: Cannot find user library
Reply #6 - Jan 7th, 2015 at 3:13pm
Print Post  
Okay please switch on "tools>visual micro>verbose messages"

then run a build and email the output 

Thanks
  
Back to top
IP Logged
 
Tim@Visual Micro
Administrator
*****
Offline


Posts: 12191
Location: United Kingdom
Joined: Apr 10th, 2010
Re: Cannot find user library
Reply #7 - Jan 7th, 2015 at 5:21pm
Print Post  
Thanks for the build output and previous trace I can see the issue.

Previously Arduino has only allowed libraries directly below the libraries folder. There has been discussion on the Arduino dev forum about allowing libraries to exist one level down in the same way that your library 'Metro' exists one level down.

Metro-Arduino-Wiring-master\Metro\Metro.h

I have been looking forward to altering Visual Micro to support this additional level and now that I know Arduino have released it I will implement it over the next few days. I must have missed the release in the Arduino release notes however I will test this with the Arduino ide later today.

Anyway, for now move your library up a level and it will work correctly.

Remove the "Metro-Arduino-Wiring-master" folder making sure that the "Metro" library is directly below C:\Users\Khalil\Documents\Arduino\Libraries

So the result will be ...

C:\Users\Khalil\Documents\Arduino\Libraries\Metro

Thanks very much for the report and all the information

  
Back to top
IP Logged
 
khalilm
Junior Member
**
Offline


Posts: 17
Joined: Jan 6th, 2015
Re: Cannot find user library
Reply #8 - Jan 7th, 2015 at 5:56pm
Print Post  
You can ignore the last post. It does work, I just needed to Rebuild the Toolchain after including the new library.

Thanks for your help.
Khalil
  
Back to top
 
IP Logged
 
Tim@Visual Micro
Administrator
*****
Offline


Posts: 12191
Location: United Kingdom
Joined: Apr 10th, 2010
Re: Cannot find user library
Reply #9 - Jan 7th, 2015 at 6:10pm
Print Post  
Great, yes sorry forgot to say reload or restart the ide

Thanks again
  
Back to top
IP Logged
 
Tim@Visual Micro
Administrator
*****
Offline


Posts: 12191
Location: United Kingdom
Joined: Apr 10th, 2010
Re: Cannot find user library
Reply #10 - Jan 7th, 2015 at 8:35pm
Print Post  
Hi khalilm,

I have looked into this and the Arduino Ide does not work in the way you had configured your user library. Your library is called "Metro" and was incorrectly contained in a sub folder called Metro-Arduino-Wiring-master. Having a library in a sub folder is an invalid configuration for 1.0.6. 

I think the Arduino Ide handles the problem in a confusing manner. This is what happens with you example in the Arduino Ide ... 

Arduino does not show the correct "Metro" library on the user libraries menu, instead it incorrectly shows "Metro-Arduino-Wiring-master". If you click the "Metro-Arduino-Wiring-master" library to insert it into a sketch then nothing happens and the correct #import(s) are not automatically included in the sketch for you.

If you manually add a valid Arduino #include into the sketch, such as #imports <Metro.h>  then one of two things can happen...

1) without adding any code that uses the Metro library then the Arduino Ide will compile the sketch okay but will show a report that it was unable to locate the Metro.h file.

2) if you add any code that uses the Metro library then the compile fails


This is why Visual Micro only shows valid libraries and I am looking forward to adding support for an extra level of sub folders because the library zips from GIT and many other places always have the extra level. I find it really annoying tooo!  Smiley



  
Back to top
IP Logged
 
khalilm
Junior Member
**
Offline


Posts: 17
Joined: Jan 6th, 2015
Re: Cannot find user library
Reply #11 - Jan 7th, 2015 at 8:57pm
Print Post  
Hi Tim,

Thanks for the information. I had used the Metro library before and was in the process of upgrading it when I also decided to upgrade the IDE as well. I just find that not saving on compile was annoying me to no end and I wanted a more professional IDE.

So you are probably 100% correct that it wont compile because I was just about to add the code when I did the switch.

I do appreciate the level of support and hassle you have gone through to troubleshoot this and sending me this additional information. I will be more careful next time. I just assumed that subfolders would work.  Undecided
  
Back to top
 
IP Logged
 
Tim@Visual Micro
Administrator
*****
Offline


Posts: 12191
Location: United Kingdom
Joined: Apr 10th, 2010
Re: Cannot find user library
Reply #12 - Jan 8th, 2015 at 12:39pm
Print Post  
hey no probs I am just pleased the confusion is clear it is a big weakness of the arduino ide at the moment.

Thanks for the good reports it's always easy to find the solution with the right info.

Best of luck
« Last Edit: Jan 8th, 2015 at 12:40pm by Tim@Visual Micro »  
Back to top
IP Logged
 
khalilm
Junior Member
**
Offline


Posts: 17
Joined: Jan 6th, 2015
Re: Cannot find user library
Reply #13 - Jan 11th, 2015 at 7:16pm
Print Post  
Hi Tim,

I still seem to be having issues with my setup and I have been going crazy trying to figure out what it is.

It seems every time I add a library to my code, something goes wonky and my compile fails on an already added library. If I take the same code and compile it in the Arduino IDE it works fine.

I have tried creating new solutions but this only works until I add a library again. I am trying to narrow it down to specific steps but it seems so random. There are no errors in the compile (ie finding files) it just generates error in the code. 

Any ideas what I can try to fix or narrow down this issue?

EDIT: It has gotten to the point where I have decided to compile and deploy via Arduino IDE (ie. using an external editor)
« Last Edit: Jan 11th, 2015 at 7:17pm by khalilm »  
Back to top
 
IP Logged
 
khalilm
Junior Member
**
Offline


Posts: 17
Joined: Jan 6th, 2015
Re: Cannot find user library
Reply #14 - Jan 11th, 2015 at 7:28pm
Print Post  
I may be grasping at straws here but it seems that if there is an error in the compile of a library, the solution never recovers. It continues to generate an errors in the last include even though the Arduino IDE compiles it without error.

I dont know if that is an error of VM or VS?
  
Back to top
 
IP Logged
 
Tim@Visual Micro
Administrator
*****
Offline


Posts: 12191
Location: United Kingdom
Joined: Apr 10th, 2010
Re: Cannot find user library
Reply #15 - Jan 11th, 2015 at 8:02pm
Print Post  
Hi,

I am confused. You say the compile fails then you say "There are no errors in the compile (ie finding files) it just generates error in the code."

There is a difference between clicking Build/Upload and intellisense errors in the code and it will help to understand exactly what you are seeing.

Please post the output from the build after after clicking build.

Thanks

  
Back to top
IP Logged
 
khalilm
Junior Member
**
Offline


Posts: 17
Joined: Jan 6th, 2015
Re: Cannot find user library
Reply #16 - Jan 11th, 2015 at 8:15pm
Print Post  
Hi,

Sorry for the confusion.

Here is the output from VS. Arduino shows no errors compiling the same file. 

There were no errors in the code UNTIL I added a USER library that couldn't compile because it also needed the ETHERNET support library. From that point on the project will not compile.

I even tried removing the added user library and ETHERNET library and it still generates the errors. Due to the length of the output I have emailed it to you.

Thanks,
Khalil

  
Back to top
 
IP Logged
 
Tim@Visual Micro
Administrator
*****
Offline


Posts: 12191
Location: United Kingdom
Joined: Apr 10th, 2010
Re: Cannot find user library
Reply #17 - Jan 11th, 2015 at 8:19pm
Print Post  
Thanks. You can click build-clean to clear previous compiler cache but you should not need to do that. I will look at the output
  
Back to top
IP Logged
 
Tim@Visual Micro
Administrator
*****
Offline


Posts: 12191
Location: United Kingdom
Joined: Apr 10th, 2010
Re: Cannot find user library
Reply #18 - Jan 11th, 2015 at 8:22pm
Print Post  
Hi, which board do you have selected in the arduino ide?

Thanks
  
Back to top
IP Logged
 
khalilm
Junior Member
**
Offline


Posts: 17
Joined: Jan 6th, 2015
Re: Cannot find user library
Reply #19 - Jan 11th, 2015 at 8:25pm
Print Post  
Arduino Mega 2560 or Mega ADK 

(Using the Mega 2560)
  
Back to top
 
IP Logged
 
Page Index Toggle Pages: [1] 2 
Send TopicPrint