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) Remove unused libraries from Visual Studio project (Read 12630 times)
Anton Kalcik
Junior Member
**
Offline


Posts: 10
Joined: Jul 28th, 2015
Remove unused libraries from Visual Studio project
Sep 2nd, 2015 at 10:22am
Print Post  
How can I remove unused libraries from my Visual Studio project I already referenced via Visual Micro -> Add Library?

UPDATE:
I see: In *.vcxproj file is in the <AdditionalIncludeDirectories/> the path to corresponding libraries. But is it also possible to remove it with the help of GUI?
« Last Edit: Sep 2nd, 2015 at 11:13am by Anton Kalcik »  
Back to top
 
IP Logged
 
Tim@Visual Micro
Administrator
*****
Offline


Posts: 12071
Location: United Kingdom
Joined: Apr 10th, 2010
Re: Remove unused libraries from Visual Studio project
Reply #1 - Sep 2nd, 2015 at 11:35am
Print Post  
Hi,

This works the same way the Arduino ide works. The #includes from the .ino files are parsed and lib paths deduced.

This means that removing #includes removes libraries

All the "Add Lib" command does is to add the #includes
« Last Edit: Sep 2nd, 2015 at 11:36am by Tim@Visual Micro »  
Back to top
WWW  
IP Logged
 
Anton Kalcik
Junior Member
**
Offline


Posts: 10
Joined: Jul 28th, 2015
Re: Remove unused libraries from Visual Studio project
Reply #2 - Sep 2nd, 2015 at 11:44am
Print Post  
Ah thank you. But i would like to use (regarding my question http://www.visualmicro.com/forums/YaBB.pl?num=1440772413) the copies of libraries to be able check them into source code repository. But when I include them (#include) always is used path to the personal library (..\Users\[Username]\Documents\Arduino\libraries) in the <AdditionalIncludeDirectories/>
  
Back to top
 
IP Logged
 
Tim@Visual Micro
Administrator
*****
Offline


Posts: 12071
Location: United Kingdom
Joined: Apr 10th, 2010
Re: Remove unused libraries from Visual Studio project
Reply #3 - Sep 2nd, 2015 at 11:49am
Print Post  
I'm sorry I don't understand what you are trying to achieve. 

I have explained how arduino libraries work and where they must be located and that we will be extending the system in the not too distant future to give more fleixbility.
  
Back to top
WWW  
IP Logged
 
Anton Kalcik
Junior Member
**
Offline


Posts: 10
Joined: Jul 28th, 2015
Re: Remove unused libraries from Visual Studio project
Reply #4 - Sep 2nd, 2015 at 12:06pm
Print Post  
I copied the libraries from my arduino personal library folder in the project folder. I hoped when I replace in the <AdditionalIncludeDirectories/> the paths to the arduino personal library  with the paths to the project folder the preprocessor would search there. But as soon as I compile the project the paths to the arduino personal library folder are re-added again.
  
Back to top
 
IP Logged
 
Tim@Visual Micro
Administrator
*****
Offline


Posts: 12071
Location: United Kingdom
Joined: Apr 10th, 2010
Re: Remove unused libraries from Visual Studio project
Reply #5 - Sep 2nd, 2015 at 12:13pm
Print Post  
I see thanks.

Have you placed the libs in the sketch folder or in a sub folder of the sketch?
  
Back to top
WWW  
IP Logged
 
Anton Kalcik
Junior Member
**
Offline


Posts: 10
Joined: Jul 28th, 2015
Re: Remove unused libraries from Visual Studio project
Reply #6 - Sep 2nd, 2015 at 12:52pm
Print Post  
See below the structure. The files are in the Libraries folder, which is the subfolder of sketch folder.

ArduinoProject

--Debug
--Libraries
----Adafruit_nRF8001
----Adafruit-GFX
----Adafruit-SSD135
----CmdMessenger
--Visual Micro

ArduinoProject.ino
ArduinoProject.vcxproj
ArduinoProject.vcxproj.filters
« Last Edit: Sep 2nd, 2015 at 12:52pm by Anton Kalcik »  
Back to top
 
IP Logged
 
Tim@Visual Micro
Administrator
*****
Offline


Posts: 12071
Location: United Kingdom
Joined: Apr 10th, 2010
Re: Remove unused libraries from Visual Studio project
Reply #7 - Sep 2nd, 2015 at 1:01pm
Print Post  
Sorry if I have not been clear.

That structure is not Arduino compatible. Arduino only supports source code in the sketch folder or in the "official" libraries folders.

There will be some additional Visual Micro options available shortly that will allow you to break the Arduino rules and do things like that.
  
Back to top
WWW  
IP Logged
 
Anton Kalcik
Junior Member
**
Offline


Posts: 10
Joined: Jul 28th, 2015
Re: Remove unused libraries from Visual Studio project
Reply #8 - Sep 2nd, 2015 at 1:20pm
Print Post  
No problem. Thank you very much for your help, I appreciate your support and your work!
« Last Edit: Sep 2nd, 2015 at 1:20pm by Anton Kalcik »  
Back to top
 
IP Logged
 
Tim@Visual Micro
Administrator
*****
Offline


Posts: 12071
Location: United Kingdom
Joined: Apr 10th, 2010
Re: Remove unused libraries from Visual Studio project
Reply #9 - Sep 8th, 2015 at 3:28pm
Print Post  
If you have the Pro version of Visual Micro enabled, in the latest release you can place local libraries in a designated folder and also use sub folders for sketch code. Local libraries override std libraries of the same name which means you can use the same system to edit or experiment with existing libraries, not just new ones.

There is a new "Item>Add>New Arduino Library" option which will create a new library in the current project and demonstrate the correct folder structure which is "_micro-api\libraries\LibName". Keep in mind there are two Arduino lib formats. The example creates the latest format but you can also use the older simpler format.
« Last Edit: Sep 9th, 2015 at 1:09pm by Tim@Visual Micro »  
Back to top
WWW  
IP Logged
 
Anton Kalcik
Junior Member
**
Offline


Posts: 10
Joined: Jul 28th, 2015
Re: Remove unused libraries from Visual Studio project
Reply #10 - Sep 9th, 2015 at 1:04pm
Print Post  
Great news thank you!
  
Back to top
 
IP Logged
 
Page Index Toggle Pages: 1
Send TopicPrint