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 Locating header files (Read 1756 times)
Bob Jones
Full Member
***
Offline


Posts: 210
Location: Bellingham, WA
Joined: Dec 4th, 2015
Locating header files
May 4th, 2018 at 5:39am
Print Post  
I have a very large sketch that includes many libraries. Some of the libraries are installed in the Libraries folder while others remain in my sketch folder while developing them. I am encountering problems where a sketch in the Library refers to a file that is still in the sketch folder. Since the #include statement is using quotes, the compiler apparently thinks the file should be in the same folder as the file referring to it instead of the sketch folder.

Is there any way I can get the compiler to always search the sketch folder first?
  
Back to top
 
IP Logged
 
Tim@Visual Micro
Administrator
*****
Offline


Posts: 12188
Location: United Kingdom
Joined: Apr 10th, 2010
Re: Locating header files
Reply #1 - May 4th, 2018 at 1:50pm
Print Post  
I will look into it when I get a mo but did you know that you can develop libraries if you use the "create shared project for libraries" facility.

  
Back to top
IP Logged
 
Tim@Visual Micro
Administrator
*****
Offline


Posts: 12188
Location: United Kingdom
Joined: Apr 10th, 2010
Re: Locating header files
Reply #2 - May 4th, 2018 at 1:57pm
Print Post  
Thinking some more you might find adding the include for the project folder will work

use F4 project properties > extraFlags

Code
Select All
-I"{sketch_path}" 




note: {sketch_path} is a system variable that will be automatically resolved to the current path. -I"{ProjectDir}" also works
« Last Edit: May 4th, 2018 at 1:58pm by Tim@Visual Micro »  
Back to top
IP Logged
 
Page Index Toggle Pages: 1
Send TopicPrint