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 Ignore files marked as excluded from project (Read 5142 times)
scott
Newbies
*
Offline


Posts: 6
Location: Farnborough,Hampshire
Joined: Jul 26th, 2012
Ignore files marked as excluded from project
Jun 3rd, 2017 at 5:07pm
Print Post  
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
 
Tim@Visual Micro
Administrator
*****
Offline


Posts: 12071
Location: United Kingdom
Joined: Apr 10th, 2010
Re: Ignore files marked as excluded from project
Reply #1 - Jun 3rd, 2017 at 5:11pm
Print Post  
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
Newbies
*
Offline


Posts: 6
Location: Farnborough,Hampshire
Joined: Jul 26th, 2012
Re: Ignore files marked as excluded from project
Reply #2 - Jun 4th, 2017 at 4:02pm
Print Post  
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
 
Tim@Visual Micro
Administrator
*****
Offline


Posts: 12071
Location: United Kingdom
Joined: Apr 10th, 2010
Re: Ignore files marked as excluded from project
Reply #3 - Jun 4th, 2017 at 4:09pm
Print Post  
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
 
smithassignment1
Newbies
*
Offline


Posts: 1
Joined: Jul 4th, 2018
Re: Ignore files marked as excluded from project
Reply #4 - Jul 4th, 2018 at 5:01am
Print Post  
Hey, my name is Jonathan and I am a newbie here. You can exclude these files as they do not have any use.
  
Back to top
 
IP Logged
 
Tim@Visual Micro
Administrator
*****
Offline


Posts: 12071
Location: United Kingdom
Joined: Apr 10th, 2010
Re: Ignore files marked as excluded from project
Reply #5 - Jul 4th, 2018 at 12:09pm
Print Post  
Hi, please create your own new threads when asking questions in this forum.

The answer is to switch OFF/False "tools>options>visual micro>compatibility>compile ALL project folder sources"

Remember: When you work this way the Arduino IDE will not like it so you need to delete files before using Arduino IDE in the future.
  
Back to top
WWW  
IP Logged
 
Page Index Toggle Pages: 1
Send TopicPrint