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 'No such file or directory' while including file (Read 2196 times)
bivalvo
Newbies
*
Offline


Posts: 5
Joined: Sep 9th, 2019
'No such file or directory' while including file
Sep 15th, 2019 at 4:47pm
Print Post  
Hi everyone.

I was trying to add a linked file as is explained on this page:

https://www.visualmicro.com/post/2016/05/27/Sharing-code-between-projects.aspx

But when I try to compile I get the next error:

"Severity      Code      Description      Project      File      Line
Error            10:26: fatal error: *****.h: No such file or directory            C:\..."

Do I need to do something else apart from what is explained on that page?

Thank you a lot.
  
Back to top
 
IP Logged
 
Tim@Visual Micro
Administrator
*****
Offline


Posts: 12071
Location: United Kingdom
Joined: Apr 10th, 2010
Re: 'No such file or directory' while including file
Reply #1 - Sep 15th, 2019 at 5:18pm
Print Post  
Please foloow the guide in yellow above
  
Back to top
WWW  
IP Logged
 
bivalvo
Newbies
*
Offline


Posts: 5
Joined: Sep 9th, 2019
Re: 'No such file or directory' while including file
Reply #2 - Sep 16th, 2019 at 8:08pm
Print Post  
Sorry, here you have:

Code (C++)
Select All
Compiling 'ProjectF' for 'ATtiny w/ ATtiny85'
Build Folder: 85/Release"
Summary: Header=1 Prototypes=6 Imports=0
Additional Defines:
Architecture Tools: "file:///C:/Program%20Files%20(x86)/Arduino/hardware/tools/avr/bin/"
Api: 1903240
Sketch Book: "file:///C:/Users/User/Documents/Arduino"
Sketch Include Paths
Core Include Paths
Include Path "file:///C:/Program%20Files%20(x86)/Arduino/hardware/arduino/avr/cores/arduino"
Include Path 1/variants/tiny8"

Deep search for libraries ...
"C:\Program Files (x86)\Arduino\hardware\tools\avr\bin\avr-g++" -c -g -Os -w -std=gnu++11 -fpermissive -fno-exceptions -ffunction-sections -fdata-sections -fno-threadsafe-statics -Wno-error=narrowing -flto -w -x c++ -E -CC -mmcu=attiny85   -DF_CPU=1000000L -DARDUINO=10809 -DARDUINO_attiny -DARDUINO_ARCH_AVR -I"C:\Program Files (x86)\Arduino\hardware\arduino\avr\cores\arduino" ants\tiny8" se\ProjectF.cpp" -o "nul"
"C:\Program Files (x86)\Arduino\hardware\tools\avr\bin\avr-g++" -c -g -Os -w -std=gnu++11 -fpermissive -fno-exceptions -ffunction-sections -fdata-sections -fno-threadsafe-statics -Wno-error=narrowing -flto -w -x c++ -E -CC -mmcu=attiny85   -DF_CPU=1000000L -DARDUINO=10809 -DARDUINO_attiny -DARDUINO_ARCH_AVR -I"C:\Program Files (x86)\Arduino\hardware\arduino\avr\cores\arduino" ants\tiny8" -I"C:\Program Files (x86)\Arduino\hardware\arduino\avr\libraries\SoftwareSerial\src" se\ProjectF.cpp" -o "nul"
"C:\Program Files (x86)\Arduino\hardware\tools\avr\bin\avr-g++" -c -g -Os -w -std=gnu++11 -fpermissive -fno-exceptions -ffunction-sections -fdata-sections -fno-threadsafe-statics -Wno-error=narrowing -flto -w -x c++ -E -CC -mmcu=attiny85   -DF_CPU=1000000L -DARDUINO=10809 -DARDUINO_attiny -DARDUINO_ARCH_AVR -I"C:\Program Files (x86)\Arduino\hardware\arduino\avr\cores\arduino" ants\tiny8" -I"C:\Program Files (x86)\Arduino\hardware\arduino\avr\libraries\SoftwareSerial\src" -I"C:\Users\User\Documents\Arduino\libraries\TimerOne-1.2" se\ProjectF.cpp" -o "nul"
"C:\Program Files (x86)\Arduino\hardware\tools\avr\bin\avr-g++" -c -g -Os -w -std=gnu++11 -fpermissive -fno-exceptions -ffunction-sections -fdata-sections -fno-threadsafe-statics -Wno-error=narrowing -flto -w -x c++ -E -CC -mmcu=attiny85   -DF_CPU=1000000L -DARDUINO=10809 -DARDUINO_attiny -DARDUINO_ARCH_AVR -I"C:\Program Files (x86)\Arduino\hardware\arduino\avr\cores\arduino" ants\tiny8" -I"C:\Program Files (x86)\Arduino\hardware\arduino\avr\libraries\SoftwareSerial\src" -I"C:\Users\User\Documents\Arduino\libraries\TimerOne-1.2" se\ProjectF.cpp" -o "nul"

ProjectF.ino: 10:26: fatal error: ProtocoloUser.h: No such file or directory
   compilation terminated



	An error was encountered during the 'Deep Search' library discovery process.
Build failed for project 'ProjectF' 






-----------

I've added the files as is explained on the tutorial, but the directory that contains this files do not appear after the -I parameter... It is not supposed to appear there?
« Last Edit: Sep 18th, 2019 at 3:10pm by Tim@Visual Micro »  
Back to top
 
IP Logged
 
Tim@Visual Micro
Administrator
*****
Offline


Posts: 12071
Location: United Kingdom
Joined: Apr 10th, 2010
Re: 'No such file or directory' while including file
Reply #3 - Sep 18th, 2019 at 3:37pm
Print Post  
You have not followed the guide in yellow so it is more difficult to assist you.

There is a simple project here with a .h and a .cpp that have been added as a short cut. The two files exist in a parent folder outside of the main project. That builds okay for me.

http://www.visualmicro.com/downloads/sketch1.zip

If you continue to have a problem then please follow the guide above and also include your .cppproj file so we can see what sources you have configured and how.
  
Back to top
WWW  
IP Logged
 
bivalvo
Newbies
*
Offline


Posts: 5
Joined: Sep 9th, 2019
Re: 'No such file or directory' while including file
Reply #4 - Sep 20th, 2019 at 6:32pm
Print Post  
I've solved my problem.

It was the include that I've added on 'ProtocoloUser.c', which was between <> instead of being between "".

Sorry for not following the rules in yellow. The first time I didn't read them and the second one I misunderstood the text (I'm not english).

I'm so sorry, I always try to follow the rules.

And again, thank you! You are making a great job with all of this!
  
Back to top
 
IP Logged
 
Tim@Visual Micro
Administrator
*****
Offline


Posts: 12071
Location: United Kingdom
Joined: Apr 10th, 2010
Re: 'No such file or directory' while including file
Reply #5 - Sep 21st, 2019 at 2:04pm
Print Post  
No problem, great thanks for letting us know.
  
Back to top
WWW  
IP Logged
 
Page Index Toggle Pages: 1
Send TopicPrint