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
Hot Topic (More than 8 Replies) Error "no such file or directory" (Read 34765 times)
Jeff_Birt
Junior Member
**
Offline


Posts: 11
Location: USA
Joined: Oct 20th, 2016
Error "no such file or directory"
Oct 20th, 2016 at 4:20pm
Print Post  
I opened the SimpleDigitalFirmata example and used the ‘open copy’ feature. I got a build error “no such file or directory” as it can’t find SoftwareSerial.h which is included from SerialFirmatta.cpp. If this were 'normal' C or C++ I would know that I needed to set the Include path to find this file. I guessed that I needed to use "Add Library" to add "SoftwareSerial" but this did not help (and I tried clicking Refresh after that too.)

I tried it from the the Arduino IDE it compiled with no error. 

If I open the original example source (not the copy) of SerialFirmatta .which is in the Arduino IDE install directory of course, it compiles with no error.

I try "Add Library->SoftwareSerial" again and now it compiles from Visual Studio! Huh? There must be some sort of glitch/bug in there somewhere. But more to the point is that it compiled from the Arduino IDE with no fussing about so I would assume it should do the same from within Visual Studio.

Using Arduino IDE 1.6.12
VS 2013 Pro
VisualMicro 1610.4.2

Thanks for any help or thoughts.
  
Back to top
 
IP Logged
 
Tim@Visual Micro
Administrator
*****
Offline


Posts: 12187
Location: United Kingdom
Joined: Apr 10th, 2010
Re: Error "no such file or directory"
Reply #1 - Oct 20th, 2016 at 8:30pm
Print Post  
Hi,

It's a quite recent change to the arduino ide to automatically discover libraries in libraries.

Visual micro does support it so either you have switched it off or it needs a tweak/fix.

Please confirm the hardware you are using as these libraries change for each some boards.

Also confirm that you have switch off vMicro>Compiler>Deep search includes

Thanks
  
Back to top
IP Logged
 
Jeff_Birt
Junior Member
**
Offline


Posts: 11
Location: USA
Joined: Oct 20th, 2016
Re: Error "no such file or directory"
Reply #2 - Oct 21st, 2016 at 1:19pm
Print Post  
Tim@Visual Micro wrote on Oct 20th, 2016 at 8:30pm:
Hi,

It's a quite recent change to the arduino ide to automatically discover libraries in libraries.

OK.

Quote:
Visual micro does support it so either you have switched it off or it needs a tweak/fix.

I have what switched off?

Quote:
Please confirm the hardware you are using as these libraries change for each some boards.

Yes, I have it set to the correct board.

[quote]Also confirm that you have switch off vMicro>Compiler>Deep search includes[\quote]
I think that this is on, I will check. Presently the computer connected to the Arduino is currently updating (it is a LattePanda which is a Arduino sized Win10 SBC with an Arduino Leonardo co-processor built in.)

I also found some of the examples that come with the Arduino IDE are poorly written and the Aruduino IDE masks some of that stuff. 

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


Posts: 12187
Location: United Kingdom
Joined: Apr 10th, 2010
Re: Error "no such file or directory"
Reply #3 - Oct 21st, 2016 at 1:29pm
Print Post  
Visual Micro works the same way as the Arduino Ide so the results should be the same as long as you have NOT switched off "vMicro>Compiler>Deep search includes" 

Thanks
« Last Edit: Oct 21st, 2016 at 1:30pm by Tim@Visual Micro »  
Back to top
IP Logged
 
Jeff_Birt
Junior Member
**
Offline


Posts: 11
Location: USA
Joined: Oct 20th, 2016
Re: Error "no such file or directory"
Reply #4 - Oct 21st, 2016 at 2:48pm
Print Post  
I used Visual Micro Explorer to create a new copy of the SimpleDigitalFirmata. Set configuration to Release and built with the "vMicro>Compiler>Deep search includes" both ON (default mode) and OFF. This made no difference I still get:

Compiling 'SimpleDigitalFirmata' for 'Arduino Leonardo'
 
SerialFirmata.cpp:20: In file included from
 
SerialFirmata.h: 30:28: fatal error: SoftwareSerial.h: No such file or directory
   #include <SoftwareSerial.h>
   compilation terminated
Error compiling libraries

If I add the SoftwareSerial library with VMicro->Add Library it compiles fine. What I can't seem to find is how the INCLUDE default path is set. Is there no default INCLUDE path in the Arduino IDE/Visual Micro? Is it derived somehow? Things just seem odd compared to bog standard C or C++ conventions.

One other thing to note, after adding the library an error is generated and I have to do a refresh and then get the 'Toolchain reload complete' and can then compile the project or I guess 'sketch' in Arduino parlance. 

Error compiling libraries
Toolchain reload complete


Thanks for your help.
« Last Edit: Oct 21st, 2016 at 2:51pm by Jeff_Birt »  
Back to top
 
IP Logged
 
Tim@Visual Micro
Administrator
*****
Offline


Posts: 12187
Location: United Kingdom
Joined: Apr 10th, 2010
Re: Error "no such file or directory"
Reply #5 - Oct 21st, 2016 at 3:16pm
Print Post  
Thanks for the info.

If deep search is on and it fails then I need to look into it.

You are right that you never set include directories for Arduino projects. The directories are automatically discovered from "used" libraries.

Which board are you using?

Thanks

  
Back to top
IP Logged
 
Jeff_Birt
Junior Member
**
Offline


Posts: 11
Location: USA
Joined: Oct 20th, 2016
Re: Error "no such file or directory"
Reply #6 - Oct 21st, 2016 at 3:24pm
Print Post  
I'm using a Latte Panda which has a Leonardo compatible Arduino co-processor on it. http://www.lattepanda.com/ .

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


Posts: 12187
Location: United Kingdom
Joined: Apr 10th, 2010
Re: Error "no such file or directory"
Reply #7 - Oct 21st, 2016 at 7:58pm
Print Post  
Can you give me a link to where you downloaded the Firmatta library from and where you installed it to. or are you using one provided by the ide?
  
Back to top
IP Logged
 
Jeff_Birt
Junior Member
**
Offline


Posts: 11
Location: USA
Joined: Oct 20th, 2016
Re: Error "no such file or directory"
Reply #8 - Oct 21st, 2016 at 8:01pm
Print Post  
I'm using the one provided by the IDE. All SW versions in the first post.

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


Posts: 12187
Location: United Kingdom
Joined: Apr 10th, 2010
Re: Error "no such file or directory"
Reply #9 - Oct 21st, 2016 at 8:09pm
Print Post  
I'm confused. The Arduino IDE installs with a library call Firmata which doesn't appear to support softwareSerial and does not contain a SerialFirmatta.cpp

Can you please tell me the physical location on your pc of the SerialFirmatta.cpp you are using.

Thanks
« Last Edit: Oct 21st, 2016 at 8:10pm by Tim@Visual Micro »  
Back to top
IP Logged
 
Tim@Visual Micro
Administrator
*****
Offline


Posts: 12187
Location: United Kingdom
Joined: Apr 10th, 2010
Re: Error "no such file or directory"
Reply #10 - Oct 23rd, 2016 at 4:33am
Print Post  
Hi,

There is a new update in the Gallery with a number of improvements to the Micro Explorer.

There is also a fix to library resolution. The .cpp files located in the project were not not being scanned for library #includes. Maybe that will help you.

Thanks
  
Back to top
IP Logged
 
Jeff_Birt
Junior Member
**
Offline


Posts: 11
Location: USA
Joined: Oct 20th, 2016
Re: Error "no such file or directory"
Reply #11 - Oct 24th, 2016 at 1:08pm
Print Post  
Thank you for your efforts. The update to Visual Micro did not help unfortunately. 

I downloaded and installed the Arduino IDE 1.6.12 this morning and the latest Visual Micro as well (on a different PC) The Arduino IDE was installed and then Visual Micro. I again used VM Explorer to create a copy of SimpleDigitalFirmata and had the same build error. This was done to rule out a problem related to a single installation. 

I just found the location the Arduino IDE installs the Firmata examples: C:\Program Files (x86)\Arduino\libraries\Firmata\examples .

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


Posts: 12187
Location: United Kingdom
Joined: Apr 10th, 2010
Re: Error "no such file or directory"
Reply #12 - Oct 24th, 2016 at 6:57pm
Print Post  
Ok thanks for the test.

Can you please zip your project folder and email to info[at]visualmicro.com

Thanks
  
Back to top
IP Logged
 
Jeff_Birt
Junior Member
**
Offline


Posts: 11
Location: USA
Joined: Oct 20th, 2016
Re: Error "no such file or directory"
Reply #13 - Oct 25th, 2016 at 1:43pm
Print Post  
Tim@Visual Micro wrote on Oct 24th, 2016 at 6:57pm:
Ok thanks for the test.

Can you please zip your project folder and email to info[at]visualmicro.com

Thanks


Just emailed project file to you. Thanks.
  
Back to top
 
IP Logged
 
Tim@Visual Micro
Administrator
*****
Offline


Posts: 12187
Location: United Kingdom
Joined: Apr 10th, 2010
Re: Error "no such file or directory"
Reply #14 - Oct 25th, 2016 at 2:04pm
Print Post  
Thanks. Please switch on vMicro>Compiler>Verbose and then click Build>rebuild from the top menu.

After the build please post the output as a .txt or email to info[at]visualmicro.com

Thanks
  
Back to top
IP Logged
 
Jeff_Birt
Junior Member
**
Offline


Posts: 11
Location: USA
Joined: Oct 20th, 2016
Re: Error "no such file or directory"
Reply #15 - Oct 25th, 2016 at 2:16pm
Print Post  
Just sent verbose debug output text to you.
  
Back to top
 
IP Logged
 
Tim@Visual Micro
Administrator
*****
Offline


Posts: 12187
Location: United Kingdom
Joined: Apr 10th, 2010
Re: Error "no such file or directory"
Reply #16 - Oct 25th, 2016 at 7:57pm
Print Post  
Thanks very much for persisting with this report. v1610.25 of Visual Micro has just been released with support for automatic library discovery in "old format" Arduino library "\utility" folders.

I was being an idiot on two counts:- 

1) I forgot that old style libraries have a sub folder called \utility with "private/extra" code files. (Newer format libraries were working okay, they have unlimited sub folders below a folder called \src. The SerialFirmata.cpp exists in the \utility folder below the "old format" Firmata library)

2) I had also forgotten that some months ago a user asked me to test a modified Firmata library which I installed into the normal Arduino user libs folder: mydocuments\arduino\libraries. It didn't have a \utlilty folder. Libraries in that location override the Ide libs so my test wasn't with the same version as you were using. Hence it was my build output I should have been inspecting and not yours Smiley
« Last Edit: Oct 25th, 2016 at 8:19pm by Tim@Visual Micro »  
Back to top
IP Logged
 
Jeff_Birt
Junior Member
**
Offline


Posts: 11
Location: USA
Joined: Oct 20th, 2016
Re: Error "no such file or directory"
Reply #17 - Oct 25th, 2016 at 8:08pm
Print Post  
Version v1610.25 has done the trick, it now compiles with no errors. Thank you very much for your efforts on this. I'll be purchasing a license shortly, the VS environment is soooo much better than the Arduino IDE Smiley
  
Back to top
 
IP Logged
 
Tim@Visual Micro
Administrator
*****
Offline


Posts: 12187
Location: United Kingdom
Joined: Apr 10th, 2010
Re: Error "no such file or directory"
Reply #18 - Oct 25th, 2016 at 8:16pm
Print Post  
Great thanks Smiley
  
Back to top
IP Logged
 
Page Index Toggle Pages: 1
Send TopicPrint