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 21836 times)
Tim@Visual Micro
Administrator
*****
Offline


Posts: 12191
Location: United Kingdom
Joined: Apr 10th, 2010
Re: Cannot find user library
Reply #20 - Jan 11th, 2015 at 8:35pm
Print Post  
Okay I think I have the answer. Couple of last questions please 

how many projects in your visual studio solution?
if you click the project name node in the solution explorer so it is selected, then look at tools>visual micro>boards. which board is selected?
which board is showing in the tool bar?

a screen shot of your vs ide with a sketch open would be useful

thanks
« Last Edit: Jan 11th, 2015 at 8:35pm 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 #21 - Jan 11th, 2015 at 8:42pm
Print Post  
Answers:

1. There is only one project in the solution
2. The correct board (Arduino Mega 2560 and Mega ADK) is selected
3. Arduino Meg... (it is cut off). So it could be the Mega by itself but I made sure to choose the Arduino Mega 2560 and Mega ADK when I started.

Screenshot attached.

  

Please Register or Login to the Forum to see File Attachments
Back to top
 
IP Logged
 
khalilm
Junior Member
**
Offline


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

Ok you are probably on to something. I decided to choose the Arduino Mega 2560 dropdown again in the toolbar and the code is now compiling without error. 

It is strange because like I said, until I added a user library it was compiling fine. So I am at a loss but maybe you know why?
  
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 #23 - Jan 11th, 2015 at 8:52pm
Print Post  
Okay thanks

What is happening is that the compile output you sent me shows that visual micro thinks the "Arduino Uno" is selected and not the mega.

I need to look into how it can become confused but I suspect the problem will resolve itself if you select the correct board then save the project.

To do that please follow these steps.

1) With the project selected as per your image change to a different Arduino board using the toolbar or menu. Then select the correct mega board again.
2) Click File>Saveor File>SaveAll

This should ensure the project now retains your board selection.

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 #24 - Jan 11th, 2015 at 8:55pm
Print Post  
Just seen you last post. I think the problem is the board selection was not saved with the project. 

I will look into what happens when a project does not have a board saved against it. The tool bar obviously looks in the general preferences but the compiler is obviously using a different default.

If you save your changes after selecting a board all should be okay
  
Back to top
IP Logged
 
khalilm
Junior Member
**
Offline


Posts: 17
Joined: Jan 6th, 2015
Re: Cannot find user library
Reply #25 - Jan 11th, 2015 at 9:05pm
Print Post  
Yes I saw that in the output once I really looked at it. I am thinking how I may have done this. 

I tried creating a new Sketch project in the IDE as is but it uses the mega properly. I will keep an eye open to see if this happens again

Doesn't the board get auto-saved on BUILD? I know I have a habit of saving regularly. Is there something specific I need to do in order to save the board (ie. Trigger the save in the dropdown?)
  
Back to top
 
IP Logged
 
khalilm
Junior Member
**
Offline


Posts: 17
Joined: Jan 6th, 2015
Re: Cannot find user library
Reply #26 - Jan 11th, 2015 at 9:16pm
Print Post  
I tried to run through all the steps I could remember on creating the project (generating errors, cleaning, scanning, relinking etc). 

I even tried restarting VS and creating a new project but can't seem to reproduce it. Figures  Smiley  even though I had it happen 3 or 4 times now.

So I will continue to keep an eye out for how this may have been changed and if I discover it, I will let you know.

Again thanks for taking the time and for the effort in solving this. 

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 #27 - Jan 11th, 2015 at 9:21pm
Print Post  
Thanks, it doesn't auto save on build but maybe that is an idea. 

In theory the board doesn't change very often but if you do change a board or create a new project then remember to save when prompted on exit.

I am going to look at the import library. Interestingly in atmel studio the project is saved when you import a library. It's possible that process is causing the wrong board to be saved to the project if a board had not previously been saved. or something like that.

you have given me a bit to go on so thanks again
  
Back to top
IP Logged
 
Page Index Toggle Pages: 1 [2] 
Send TopicPrint