VS Arduino
>> >> Libraries including libraries
https://www.visualmicro.com/forums/YaBB.pl?num=1585313828

Message started by Nathan Phillips on Mar 27th, 2020 at 12:57pm

Title: Libraries including libraries
Post by Nathan Phillips on 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?

Title: Re: Libraries including libraries
Post by Visual Micro on 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.

Title: Re: Libraries including libraries
Post by Nathan Phillips on 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.

Title: Re: Libraries including libraries
Post by Visual Micro on Apr 1st, 2020 at 2: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.

VS Arduino » Powered by YaBB 2.6.12!
YaBB Forum Software © 2000-2024. All Rights Reserved.