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 Included files, "No such file or directory" (Read 1426 times)
arduinoUser2
Junior Member
**
Offline


Posts: 41
Joined: Dec 30th, 2015
Included files, "No such file or directory"
Mar 7th, 2022 at 2:48pm
Print Post  
Visual Studio Community 2019 & Visual Micro 2022.218.1901.

My project .ino file has the line,

Code (C++)
Select All
#include "examples\99_Misc\PinInformation\PinInfo.h" 



In "Property Pages -> Configuration Properties -> VC++ Directories" I have added,

C:\Users\MyUsername\Documents\Arduino\libraries\TeensyTimerTool\

In the VS editor I can open PinInfo.h by right clicking and selecting "Go to document".

However, when I compile the "Micro Build" output window shows,

"TeensyTimerTool.ino: 9:53: fatal error: examples\99_Misc\PinInformation\PinInfo.h: No such file or directory".

It appears to me that Visual Micro is not picking up the Property Pages setting.

What am I missing?
  
Back to top
 
IP Logged
 
Simon@Visual Micro
Administrator
*****
Offline


Posts: 2145
Joined: Feb 13th, 2019
Re: Included files, "No such file or directory"
Reply #1 - Mar 7th, 2022 at 3:13pm
Print Post  
Thanks for the report.

The VC++ paths are not directly used by Visual Micro in the build process, as it is using the build rules for the Arduino environment.

You can either:
1) Put the fully qualified path into your sketch
2) Clone the PinInfo.h from the library example into your sketch folder (or in the SketchFolder\src folder), and change the include to #include "PinInfo.h"

A Side Note:
When you open a library example from the Micro Explorer, there is an option to "Open a Copy" which should clone the whole Library Example into a new project, so it will then compile with just the short include from (2) above.
  
Back to top
 
IP Logged
 
arduinoUser2
Junior Member
**
Offline


Posts: 41
Joined: Dec 30th, 2015
Re: Included files, "No such file or directory"
Reply #2 - Mar 7th, 2022 at 6:25pm
Print Post  
I am trying to compile an example from TeensyTimerTool (https://github.com/luni64/TeensyTimerTool), specifically his "Avoid PWM timer clashes" example (https://github.com/luni64/TeensyTimerTool/wiki/Avoid-PWM-timer-clashes). ; Even when I put all the .h files in the same directory as the Sketch .ino file, I keep getting compile errors.  For example,

= = =
Compiling debug version of 'TeensyTimerTool' for 'Teensy 3.6'
 
TeensyTimerTool.cpp.o: In function setup

Error linking for board Teensy 3.6
Debug build failed for project 'TeensyTimerTool'
TeensyTimerTool.ino:18: undefined reference to PwmTimerType
TeensyTimerTool.ino:18: undefined reference to PwmTimerModule
 
collect2.exe*: error: ld returned 1 exit status
= = =

I have not tried your "A Side Note" suggestion.  1) Do you believe that that would work?  2) Using Visual Micro without the something like the VC++ include directory string reference is a challenge.  Is there any other method available?

Thanks.
  
Back to top
 
IP Logged
 
Simon@Visual Micro
Administrator
*****
Offline


Posts: 2145
Joined: Feb 13th, 2019
Re: Included files, "No such file or directory"
Reply #3 - Mar 7th, 2022 at 6:45pm
Print Post  
Thanks for the detailed information on which library this is from.

Once the library is installed (in Sketchbook\libraries folder), and using the Micro Explorer > Examples tab (search for "Timer") to open the 99_Misc Example as a copy, it clones the example and compiles as expected. The below video shows how to use Library Examples in vMicro:
https://www.youtube.com/watch?v=JZDQz2kfjsM

The files to be included in an Arduino project are the same standard as the Arduino IDE, which is a simplified way of working with code files compared to standard C++.

A few pages are available from our documentation below to help understand the options available to add files to a project, and from a library:

Using Libraries: https://www.visualmicro.com/page/User-Guide.aspx?doc=Add-Libraries.html
About INO and CPP Files: https://www.visualmicro.com/page/User-Guide.aspx?doc=INOs-and-CPPs.html
Project File Structure: https://www.visualmicro.com/page/Understanding-Project-File-Structure.aspx

  
Back to top
 
IP Logged
 
Page Index Toggle Pages: 1
Send TopicPrint