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 Need ability to edit my library. (Read 2134 times)
Richardw
Junior Member
**
Offline


Posts: 15
Joined: Mar 2nd, 2014
Need ability to edit my library.
Jul 7th, 2014 at 1:40am
Print Post  
Hello,
  I can compile my project. But when I want to add my library to the Solution Explorer so I can edit the files, that will cause a lot of compile errors about that library not being a type.  I right click on project name, add existing item, and pick the cpp and h files for the library.  The libraries are in the arduino/libraries fold and my project is somewhere else.  Please let me know what you need to fix. Thanks.
  
Back to top
 
IP Logged
 
Tim@Visual Micro
Administrator
*****
Offline


Posts: 12163
Location: United Kingdom
Joined: Apr 10th, 2010
Re: Need ability to edit my library.
Reply #1 - Jul 7th, 2014 at 1:56am
Print Post  
Which ide are you using? Visual Studio or Atmel Studio. they work differently in this area
  
Back to top
IP Logged
 
Richardw
Junior Member
**
Offline


Posts: 15
Joined: Mar 2nd, 2014
Re: Need ability to edit my library.
Reply #2 - Jul 7th, 2014 at 2:41am
Print Post  
Ah sorry its Visual Studio.  Eh Sorry Amtel Studio.  Was thinking from other post.
« Last Edit: Jul 7th, 2014 at 2:46am by Richardw »  
Back to top
 
IP Logged
 
Tim@Visual Micro
Administrator
*****
Offline


Posts: 12163
Location: United Kingdom
Joined: Apr 10th, 2010
Re: Need ability to edit my library.
Reply #3 - Jul 7th, 2014 at 7:08pm
Print Post  
It's easier in Visual Studio because it supports adding Virtual Folders to the solution/project. The "project>show all sketch files" facility doesn't work yet in atmel studio.

I think the problem is the way you added the library files. When you "Add existing item" you should have the option to "Add As Link" which should be a shortcut to the library source file(s). I think you used the option that copied the source file into the current folder which would cause problems.

As long as the source is "linked" not copied visual micro will not include it in the compile. Because atmel studio does not support virtual folders you should create a physical folder under your project as a "dummy" placeholder. Use the solution explorer to add the new folder. You might call it 'Arduino Libraries'. Then add your source code as LINKS to the dummy folder(s) you create in the atmel studio solution explorer.

I hope this makes sense, we do want to automate this for users but it's under experimentation Smiley It would be nice if it worked liked Visual Studio!

In any even visual micro should detect changes to the library sources during compile. If it doesn't you can either use Build>Clean Solution or switch of library compiler cache in the project options

If you add new source files you libraries without re-starting the ide then click tools>visual micro>reload tool chains or I think there is an option to switch off lib file discovery cache but it will make compile and usage much slower.

Finally you could probably a std atmel studio project to work on your lib sources, the change and cache detection rules described above would still apply (for better or for worse).

Hope this makes sense

ps: You might need to ignore some errors that appear in the atmel studio intellisense window. The compile is the finite proof of correct code which is unconnected to the intellisense engine.
« Last Edit: Jul 7th, 2014 at 7:09pm by Tim@Visual Micro »  
Back to top
IP Logged
 
Richardw
Junior Member
**
Offline


Posts: 15
Joined: Mar 2nd, 2014
Re: Need ability to edit my library.
Reply #4 - Jul 8th, 2014 at 2:45am
Print Post  
Sorry I don't see an Add As Link choice with Amtel Studio
http://imgur.com/HzISBFJ

I just don't get  what u mean for other choices.  I right clicked on Libraries and added one but I can not edit the file.
  
Back to top
 
IP Logged
 
Tim@Visual Micro
Administrator
*****
Offline


Posts: 12163
Location: United Kingdom
Joined: Apr 10th, 2010
Re: Need ability to edit my library.
Reply #5 - Jul 8th, 2014 at 12:51pm
Print Post  
Did you understand my comment about adding file references as a "link"?

The compiler does not look at the atmel project, it looks directly at the sources in the sketch folder. So there can not be an error unless the library sources are moved into the sketch folder. This would suggest you did not understand my point about "linking" sources and "not adding" source

If you are seeing errors you should post some of these errors so we can understand the points you are making.
  
Back to top
IP Logged
 
Richardw
Junior Member
**
Offline


Posts: 15
Joined: Mar 2nd, 2014
Re: Need ability to edit my library.
Reply #6 - Jul 8th, 2014 at 9:59pm
Print Post  
I did not get the Add As Link but I searched good old Youtube and found this example https://www.youtube.com/watch?v=n_IvIQeRaCo whiched help a lot. It shows you use down arrow on the Add button to selected As Link there.  I placed that info in here in case it might help others.
Thanks for the help.  Now I just got to figure out why my code isn't working right, ugh.
  
Back to top
 
IP Logged
 
Tim@Visual Micro
Administrator
*****
Offline


Posts: 12163
Location: United Kingdom
Joined: Apr 10th, 2010
Re: Need ability to edit my library.
Reply #7 - Jul 8th, 2014 at 10:10pm
Print Post  
I think out messages crossed when you asked this question so I didn't see it

Quote:
Sorry I don't see an Add As Link choice with Amtel Studio
http://imgur.com/HzISBFJ

I just don't get  what u mean for other choices.  I right clicked on Libraries and added one but I can not edit the file.


Please notice the "Add" button has a menu with "add as link"

Thanks
« Last Edit: Jul 8th, 2014 at 10:12pm by Tim@Visual Micro »  

Please Register or Login to the Forum to see File Attachments
Back to top
IP Logged
 
Page Index Toggle Pages: 1
Send TopicPrint