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 Unable to access header files (Read 3928 times)
vmsh
Junior Member
**
Offline


Posts: 16
Joined: Jul 9th, 2017
Unable to access header files
Jul 9th, 2017 at 9:05pm
Print Post  
Hello,

I recently installed the latest VS extension on VS2015. I created an Arduino project, and wrote some code.
I have three files: Sketch.ino in the root folder, Proto.cpp in the "Source Files" folder and Proto.h in the "Header Files" folder.

When compiling I get the following error:
Quote:
Sketch.ino: 8:24: fatal error: Proto.h: No such file or directory
   #include <Proto.h>
   compilation terminated

It seems to suggest that the header file cannot be found.
If I remove the reference to the header file from Sketch.ino, the same error appears but it is instead triggered from Proto.cpp, which also includes the header file.
  
Back to top
 
IP Logged
 
Tim@Visual Micro
Administrator
*****
Offline


Posts: 12071
Location: United Kingdom
Joined: Apr 10th, 2010
Re: Unable to access header files
Reply #1 - Jul 9th, 2017 at 9:24pm
Print Post  
Hi,

Please click the icon above the solution explorer called "show all files". Then confirm where the Proto.h is located.

Thanks
  
Back to top
WWW  
IP Logged
 
vmsh
Junior Member
**
Offline


Posts: 16
Joined: Jul 9th, 2017
Re: Unable to access header files
Reply #2 - Jul 10th, 2017 at 6:36am
Print Post  
Hello,
They are all in the same directory. This is confirmed by Windows Explorer.
  
Back to top
 
IP Logged
 
Tim@Visual Micro
Administrator
*****
Offline


Posts: 12071
Location: United Kingdom
Joined: Apr 10th, 2010
Re: Unable to access header files
Reply #3 - Jul 10th, 2017 at 10:54am
Print Post  
Hi,

This is for libraries and files in the compiler include paths

#include <Proto.h>

This is for relative paths and files in current project

#include "Proto.h"


nb: There is an option to add the project folder as compiler include path if you need it but the above syntax is clearer
  
Back to top
WWW  
IP Logged
 
Tim@Visual Micro
Administrator
*****
Offline


Posts: 12071
Location: United Kingdom
Joined: Apr 10th, 2010
Re: Unable to access header files
Reply #4 - Jul 11th, 2017 at 8:27pm
Print Post  
Off-Topic replies have been moved to this Topic.
  
Back to top
WWW  
IP Logged
 
Page Index Toggle Pages: 1
Send TopicPrint