Welcome, Guest. Please Login or Register
Arduino IDE for Visual Studio
 
  HomeSearch Tutorials & Wiki visualmicro.com LoginHelpRegister  
 
Page Index Toggle Pages: 1
Send Topic Print
Ignore files marked as excluded from project (Read 97 times)
Visual Micro
Administrator
*****
Offline



Posts: 7722
United Kingdom
Re: Ignore files marked as excluded from project
Reply #3 - Jun 4th, 2017 at 5:09pm
 
Thanks very much for the support.

Yes I will look into that. In fact what needs to happen is regardless of if files are included in the project.

If they are included in the project but not discovered during deep search then they should still be ignored.

The "vmicro>toggle hidden files" in vs2013 is the best option for now. Then you can see your library sources linked under a folder called "src\_micro-api-readonly\libraries". The files are ignored during compile but remember that I used the word "LINKED". Visual micro does not copy the library sources to the project, is used links/shortcuts. This gives the live source code view inside your project without interfering with compile.

Or you can create "solution folders" outside of the project and add linked source to them.
Back to top
 
WWW  
IP Logged
 
scott
Junior Member
**
Offline



Posts: 6
Farnborough,Hampshire
Re: Ignore files marked as excluded from project
Reply #2 - Jun 4th, 2017 at 5:02pm
 
Thanks for the quick response Tim.
I dont think I explained my setup that well. The folder structure on windows is as the normal arduino setup, e.g. project folder and libraries etc with the added VisualStudio visualMicro project.

ProjectTopLevel
...VsProjectSolution.sln
...VsProjectFolder
.......Project.ino
.......Project.vcxproj etc
...libraries
.......libraryX

I was adding the files from the ..\libraries\libraryX\... to the project so I could edit the library and build my project from the same VS project. I had set the C/Cpp file not to build but they got build anyway.
The setup above maintains the arduino compatibility but allow me to edit the library in use and build my project at the same time.

Your link sounds great, just what I'm looking for, however I'm using VS2013. Stuck with that build environment for now I'm afraid.

I tried your other option of setting the:
Tools/options/VisualMicro/Compatibility/Compile Files In Project
as false, this worked a treat with the C/Cpp files set as not in project build. I did look at the project options but forgot to look in those options.

Thanks for the help. Visual Micro is a great tool, I frequently recommend it to my friends and colleagues and I'd recommend it to anyone who builds arduino and AVR projects. Great support too as always! Cheesy Smiley

Cheers.
Back to top
 
 
IP Logged
 
Visual Micro
Administrator
*****
Offline



Posts: 7722
United Kingdom
Re: Ignore files marked as excluded from project
Reply #1 - Jun 3rd, 2017 at 6:11pm
 
There is a tool options setting that might disable that feature but if you tried to compile the files in the arduino ide is would probably get confused. It's best not to put them in the project folder.

There is a better way to work. Either use "vmicro>toggle hidden files" (if it doesn't crash due to vs bugs which ms is investigating) or use the checkbox on the "add library" menu that "creates a project" for a library. The project allows you to see (and develop) the library sources as a real vs project.

http://www.visualmicro.com/post/2017/01/16/Arduino-Cross-Platform-Library-Develo...

Back to top
 
WWW  
IP Logged
 
scott
Junior Member
**
Offline



Posts: 6
Farnborough,Hampshire
Ignore files marked as excluded from project
Jun 3rd, 2017 at 6:07pm
 
Currently it seems that c/cpp files included in the project but marked as exclude from build still get compiled which causes mulitple definition linker errors in the same files are library files also used in the project.
E.G. I inlcude stepper.c in the project and set to not build and the project uses the stepper library.

I normally have the c/cpp from the libraries I'm using in the project for ease of reference (set to not include in build), which is currently causing link errors.
Back to top
 
 
IP Logged
 
Page Index Toggle Pages: 1
Send Topic Print