Welcome, Guest. Please Login or Register
Arduino IDE for Visual Studio
 
 
When Logging a Support Issue in the Forum, please ensure you have also:-
  • Enabled vMicro > Compiler > Show Build Properties and Verbose
  • Re-Compile your program with these settings enabled
 
Save the new Output to a Text File and....
Support requests without the output above may be impossible to answer, so please help us to help you
 
  HomeSearch Tutorials & Wiki visualmicro.com LoginHelpRegister  
 
Page Index Toggle Pages: 1
Send Topic Print
Libraries including libraries (Read 173 times)
Nathan Phillips
Newbies
*
Offline



Posts: 7
Libraries including libraries
Mar 27th, 2020 at 12:57pm
 
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
 
Visual Micro
Administrator
*****
Offline



Posts: 10653
United Kingdom
Re: Libraries including libraries
Reply #1 - Mar 27th, 2020 at 1:05pm
 
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
Re: Libraries including libraries
Reply #2 - Mar 27th, 2020 at 7:31pm
 
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
 
Visual Micro
Administrator
*****
Offline



Posts: 10653
United Kingdom
Re: Libraries including libraries
Reply #3 - Apr 1st, 2020 at 3:55pm
 
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 Topic Print