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 Linked project list grows too fast when I create hierarchical class library (Read 1455 times)
Evgeny Zhekaus
Junior Member
**
Offline


Posts: 38
Joined: Sep 19th, 2018
Linked project list grows too fast when I create hierarchical class library
Oct 9th, 2018 at 2:56pm
Print Post  

Hi,
It seems, I am sharing code across the projects wrongly: list of linked projects grows too fast in solutions. I read everything about code sharing and libraries I found in docs, however I can’t say surely that I get it right.
For instance, I am creating a little class library which has base class and few children – each child for particular device only. So in a particular project I need one child only. In order to achieve it, I create a library for a base class and library project per a child.
So in order to use a child class in a project, I need to add two library project into the main one: base library project and child library project.
So far so good.
But what if I need to make an extended version of a child? Currently I create another library project (grandson) where I put a grandson class only. Now I need to add 3 library projects to the main project. 
I’m afraid, that with such a technique my project will be bloated very soon what will definitely affect the compilation performance. Moreover, it’s cumbersome to add long list of libraries to the main project and it’s extremely difficult to maintain all over the projects.
So what is the best way to maintain hierarchical class library using vMicro?

I was tried to stop using code sharing library projects at all. But I couldn’t make the compiler see ancestor’s headers in a right place.
  
Back to top
 
IP Logged
 
Tim@Visual Micro
Administrator
*****
Offline


Posts: 12188
Location: United Kingdom
Joined: Apr 10th, 2010
Re: Linked project list grows too fast when I create hierarchical class library
Reply #1 - Oct 9th, 2018 at 4:22pm
Print Post  
If you are using libraries you need to stick to the arduino rules. 

It might be possible to extend visual micro in the future to allow shared projects from shared projects but I don't think visual studio supports this yet. 

You can use #defines in a single project to switch classes
  
Back to top
IP Logged
 
Evgeny Zhekaus
Junior Member
**
Offline


Posts: 38
Joined: Sep 19th, 2018
Re: Linked project list grows too fast when I create hierarchical class library
Reply #2 - Oct 11th, 2018 at 5:01am
Print Post  
Tim@Visual Micro wrote on Oct 9th, 2018 at 4:22pm:
If you are using libraries you need to stick to the arduino rules.


I would gladly stopped using libraries if I knew another way of sharing own code.
Is there?
  
Back to top
 
IP Logged
 
Tim@Visual Micro
Administrator
*****
Offline


Posts: 12188
Location: United Kingdom
Joined: Apr 10th, 2010
Re: Linked project list grows too fast when I create hierarchical class library
Reply #3 - Oct 11th, 2018 at 10:42am
Print Post  
I have no idea what you have configured. You need to zip your solution with projects along with source code or explain. 

Email or attach here. Email to info[at]visualmicro.com along with link to this thread.
  
Back to top
IP Logged
 
Page Index Toggle Pages: 1
Send TopicPrint