Welcome, Guest. Please Login or Register
Arduino IDE for Visual Studio
 
 
When Logging a Support Issue in the Forum, please ensure you have also:-
  • Enabled vMicro > Compiler > Show Build Properties and Verbose
  • Re-Compile your program with these settings enabled
 
Save the new Output to a Text File and....
Support requests without the output above may be impossible to answer, so please help us to help you
 
  HomeSearch Tutorials & Wiki visualmicro.com LoginHelpRegister  
 
Page Index Toggle Pages: 1
Send Topic Print
Remove unused libraries from Visual Studio project (Read 8927 times)
Anton Kalcik
Junior Member
**
Offline



Posts: 10
Remove unused libraries from Visual Studio project
Sep 2nd, 2015 at 11:22am
 
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?
Back to top
« Last Edit: Sep 2nd, 2015 at 12:13pm by Anton Kalcik »  
 
IP Logged
 
Visual Micro
Administrator
*****
Offline



Posts: 10473
United Kingdom
Re: Remove unused libraries from Visual Studio project
Reply #1 - Sep 2nd, 2015 at 12:35pm
 
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
Back to top
« Last Edit: Sep 2nd, 2015 at 12:36pm by Visual Micro »  
WWW  
IP Logged
 
Anton Kalcik
Junior Member
**
Offline



Posts: 10
Re: Remove unused libraries from Visual Studio project
Reply #2 - Sep 2nd, 2015 at 12:44pm
 
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
 
Visual Micro
Administrator
*****
Offline



Posts: 10473
United Kingdom
Re: Remove unused libraries from Visual Studio project
Reply #3 - Sep 2nd, 2015 at 12:49pm
 
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
Re: Remove unused libraries from Visual Studio project
Reply #4 - Sep 2nd, 2015 at 1:06pm
 
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
 
Visual Micro
Administrator
*****
Offline



Posts: 10473
United Kingdom
Re: Remove unused libraries from Visual Studio project
Reply #5 - Sep 2nd, 2015 at 1:13pm
 
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
Re: Remove unused libraries from Visual Studio project
Reply #6 - Sep 2nd, 2015 at 1:52pm
 
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
Back to top
« Last Edit: Sep 2nd, 2015 at 1:52pm by Anton Kalcik »  
 
IP Logged
 
Visual Micro
Administrator
*****
Offline



Posts: 10473
United Kingdom
Re: Remove unused libraries from Visual Studio project
Reply #7 - Sep 2nd, 2015 at 2:01pm
 
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
Re: Remove unused libraries from Visual Studio project
Reply #8 - Sep 2nd, 2015 at 2:20pm
 
No problem. Thank you very much for your help, I appreciate your support and your work!
Back to top
« Last Edit: Sep 2nd, 2015 at 2:20pm by Anton Kalcik »  
 
IP Logged
 
Visual Micro
Administrator
*****
Offline



Posts: 10473
United Kingdom
Re: Remove unused libraries from Visual Studio project
Reply #9 - Sep 8th, 2015 at 4:28pm
 
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.
Back to top
« Last Edit: Sep 9th, 2015 at 2:09pm by Visual Micro »  
WWW  
IP Logged
 
Anton Kalcik
Junior Member
**
Offline



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