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 faster compile times: ino vs cpp projects (Read 2676 times)
Simonb
Junior Member
**
Offline


Posts: 10
Joined: Sep 11th, 2015
faster compile times: ino vs cpp projects
Sep 11th, 2015 at 9:29pm
Print Post  
Hi,

I just modified a large multifile .ino project into a .cpp and .h project (still for arduino). 

I thought the version with .cpp files would compile faster as the code is not concantenated into one single file, but it seems that the .ino project compiles faster.  

Does that make any sense? Thanks.
« Last Edit: Sep 11th, 2015 at 9:29pm by Simonb »  
Back to top
 
IP Logged
 
Tim@Visual Micro
Administrator
*****
Offline


Posts: 12076
Location: United Kingdom
Joined: Apr 10th, 2010
Re: faster compile times: ino vs cpp projects
Reply #1 - Sep 11th, 2015 at 9:52pm
Print Post  
Yes for two reasons, one can be improved

1) It's really quick to concat the strings of .ino files into a single cpp then compiled to a single .o file.
2) Separate cpp files are each compiled to .o files

Item 2) can be improved because Visual Micro doesn't currently cache any sources from the sketch folder. That's due to change especially because we now support source code in sub folders so the number of cpp files in Arduino projects will most likely grow.

You can now create libraries in a sketch. Libraries are cached but I haven't had time to test of the caching is working for the local libs. Right mouse click the project and use the "Add>New Arduino Library" if you decide to try it out.
  
Back to top
WWW  
IP Logged
 
Page Index Toggle Pages: 1
Send TopicPrint