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 [2]  Send TopicPrint
Hot Topic (More than 8 Replies) Has Build Process Changed Again?? (Read 11645 times)
RayLivingston
Full Member
***
Offline


Posts: 158
Location: California
Joined: Nov 24th, 2012
Re: Has Build Process Changed Again??
Reply #20 - Jul 6th, 2017 at 10:35pm
Print Post  
Tim@Visual Micro wrote on Jul 6th, 2017 at 6:16pm:
The new system will be much more intelligent. It should just find everything where ever it is.


I look forward to seeing what that new system is...

Tim@Visual Micro wrote on Jul 6th, 2017 at 6:16pm:
I think there might have been some confusion. for example, If you wanted to reference from a project level .ino or .cpp to a .h in a sub folder I would have told you to add a path qualifier. Otherwise if in the same folder no path.

When adding libraries, due to the way arduino works, we allow one level of path for headers which specifies a unique lib name. This is useful when the same headers exist in two different libs.

It worked because the project folder did used to be added as a search path but because arduino did not work this way and many users don't understand what gets compiled it's better to keep is clean, less support and breakage for all but a few users.

Sorry you got caught. 


I think I ended up with the weird paths because some of the classes in sub-directories reference other classes in sub-directories.  I would like a "cleaner" way of doing this.  I really should just ditch the whole Arduino build, and create a makefile, but I know that would turn into several days of aggravation, so it stays well down on my ToDo list.

Regards,
Ray L.
  
Back to top
 
IP Logged
 
Tim@Visual Micro
Administrator
*****
Offline


Posts: 12076
Location: United Kingdom
Joined: Apr 10th, 2010
Re: Has Build Process Changed Again??
Reply #21 - Jul 7th, 2017 at 1:37pm
Print Post  
I think you just needed to use libraries.

The recent releases of visual micro support shared projects. That's a nice way to have libraries that exist in any location. Library paths get added as -I includes so you probably wouldn't have so many issues.

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


  
Back to top
WWW  
IP Logged
 
RayLivingston
Full Member
***
Offline


Posts: 158
Location: California
Joined: Nov 24th, 2012
Re: Has Build Process Changed Again??
Reply #22 - Jul 7th, 2017 at 2:43pm
Print Post  
Tim,

I will look into that approach.  These are, for the most part not what I think you would call "libraries".  With few exceptions, they are classes that are a part of this one large project, and would not be used anywhere else.  There are also many dependencies between many of the classes, and they are all part of a single large, heavily hierarchical application (an automatic tool changer for a CNC milling machine).  It is perfectly logical for them to be part of this project, and not part of a "shared" library in the normal Arduino sense.  But, if a different directory structure can un-tangle the seemingly fragile mess it is right now (this is the third time a tool update has broken the build), I am open to that.

Regards,
Ray L.
  
Back to top
 
IP Logged
 
Tim@Visual Micro
Administrator
*****
Offline


Posts: 12076
Location: United Kingdom
Joined: Apr 10th, 2010
Re: Has Build Process Changed Again??
Reply #23 - Jul 7th, 2017 at 3:54pm
Print Post  
Hi,

I think the only breakage was you specified a folder to access a header in the same folder. It is correct that you alter your code because it didn't make sense. When the paths you have used in your #included are correct nothing will break.

If you had preceded the path with ../ that also would have worked but it's much cleaner to remove the path from the header entirely.

You also now know how to set your own compiler -I includes so you have the capability to set things up in a known way.
  
Back to top
WWW  
IP Logged
 
Page Index Toggle Pages: 1 [2] 
Send TopicPrint