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 Libraries including libraries (Read 799 times)
Nathan Phillips
Newbies
*
Offline


Posts: 7
Joined: Jan 6th, 2020
Libraries including libraries
Mar 27th, 2020 at 12:57pm
Print Post  
When I include two existing header files from two other folders into my project and one includes the other the include causes this error:
SpecificHeader.h: 3:19: fatal error: CommonHeader.h: No such file or directory
   compilation terminated

As a solution to this I thought maybe I should structure my code so that it was three different projects, vis: Main project, Specific library and Common library. The header in Specific library references a header in Common library (which is also included by other files in Main project). It appears Specific library (being a library project) cannot have a reference to Common library added to it but I add both libraries as references to Main project. However the error persists and the include of the file in Common library within the header in Specific library still fails.

How should I structure my code so that this scenario works?
  
Back to top
 
IP Logged
 
Tim@Visual Micro
Administrator
*****
Offline


Posts: 12071
Location: United Kingdom
Joined: Apr 10th, 2010
Re: Libraries including libraries
Reply #1 - Mar 27th, 2020 at 1:05pm
Print Post  
Please submit code example for the 1st simple example that you want to work. Explain which folders the code and headers are in.
  
Back to top
WWW  
IP Logged
 
Nathan Phillips
Newbies
*
Offline


Posts: 7
Joined: Jan 6th, 2020
Re: Libraries including libraries
Reply #2 - Mar 27th, 2020 at 7:31pm
Print Post  
I couldn't reproduce the problem in a simple new project. Turns out a Rebuild All fixed it. I don't even want to know what was going on there.
  
Back to top
 
IP Logged
 
Tim@Visual Micro
Administrator
*****
Offline


Posts: 12071
Location: United Kingdom
Joined: Apr 10th, 2010
Re: Libraries including libraries
Reply #3 - Apr 1st, 2020 at 2:55pm
Print Post  
Thanks for the update. If you move a header out of the project then it is good idea to click Build>Clean or Rebuild which also does a clean.  The "clean" ensures the temp build folder is cleared.
  
Back to top
WWW  
IP Logged
 
Page Index Toggle Pages: 1
Send TopicPrint