IDE V2.03 No such file or directory

Arduino IDE V2.03. I get Compilation error: IRLib2.h: No such file or directory when trying to include either IRLib2 or IRLibALL. I have tried adding the library using the library manager add zip and also by manual installation. The unzipped files are in a folder in the library folder contained in the arduino sketch folder. Tried out having this folder on google drive and locally on PC. IRLib2 or IRLibAll do not appear as installed in the library manager.

Bit stuck, any ideas?

Hi @huttie3

What is the exact name of the library as shown in Library Manager?

Please post a link to where you downloaded the library from.

Welcome to the forum

What is the full name of the folder in which the IRLib2.h is installed ?

It does not appear in Library manager and this is the link I downloaded it from. GitHub - cyborg5/IRLib2: Library for receiving, decoding, and sending infrared signals using Arduino

It does not install, I do sketch, library, add a zip file, select the zip file on my desktop and then I get the message Error: 13 INTERNAL: Library install failed: library not valid

When installing a library via the Arduino IDE's "Add ZIP Library" feature, the ZIP file must have the right structure, which is that there is a single library in the root folder of the ZIP file. The reason you got that error is because the ZIP file you download from that repository does not have the right structure.

This non-standard repository structure is also likely why your manual installation of the library didn't work. I'll provide you with instructions you can follow to correctly install the library:

  1. Start Arduino IDE.
  2. Select File > Preferences from the Arduino IDE menus.
  3. Take note of the path shown in the "Sketchbook location" preference field.
  4. Click the "CANCEL" button in the preferences dialog.
  5. Click this link to download the contents of the library's repository:
    https://github.com/cyborg5/IRLib2/archive/refs/heads/master.zip
  6. Wait for the download to finish.
  7. Unzip the downloaded IRLib2-master.zip file.
  8. Copy the IRLib2 subfolder from the unzipped folder to the libraries subfolder of the path from the Arduino IDE "Sketchbook location" preference.
    The library installation must have this exact structure:
    Sketchbook/
    ├── libraries/
    │   └── IRLib2/
    │       ├── library.properties
    │        ....
    ...
    
    

Now try compiling your sketch again. The "IRLib2.h: No such file or directory" error should no longer occur.

The sketchbook location is C:\users\vdw\googledrive\data\arduinoVtwo

Hopefully done as you instructed correctly

but now get the following error message

In file included from c:\Users\vdw\GoogleDrive\Data\ArduinoVtwo\libraries\IRLib2/IRLibAll.h:22:0,
from C:\Users\vdw\GoogleDrive\Data\ArduinoVtwo\Solar\Solar.ino:12:
c:\Users\vdw\GoogleDrive\Data\ArduinoVtwo\libraries\IRLib2/IRLibDecodeBase.h:13:10: fatal error: IRLibProtocols.h: No such file or directory
#include "IRLibProtocols.h"
^~~~~~~~~~~~~~~~~~
compilation terminated.

exit status 1

Compilation error: exit status 1

Thanks for your help so far on this by the way. Trying to migrate from visual studio to the new arduino ide as vs too complicated for my old brain.

OK, this is good progress. The solution to this error is similar to the instructions above, except this time you need to copy the IRLibProtocols folder:

  1. Copy the IRLibProtocols subfolder from the unzipped folder to the libraries subfolder of the path from the Arduino IDE "Sketchbook location" preference.
    The library installation must have this exact structure:
    Sketchbook/
    ├── libraries/
    │   └── IRLibProtocols/
    │       ├── library.properties
    │        ....
    ...
    
    

Now try compiling your sketch again. The "IRLibProtocols.h: No such file or directory" error should no longer occur.

Ok , that fixed that. Had to do the same for irlibrecv, irlibpci and irlibfreq. Now we are hot to trot. Thanks very much for your help, epic result. I owe you some beer tokens. Is there a way to send some?

Spoke too Soon! seem to have errors on another library. Do you think this is a related problem.

In file included from c:\Users\vdw\GoogleDrive\Data\ArduinoVtwo\libraries\RTC_DS1307-master\DS1307.cpp:31:0:
C:\Users\vdw\AppData\Local\Arduino15\packages\arduino\hardware\avr\1.8.6\libraries\Wire\src/Wire.h:53:10: note: candidate: void TwoWire::begin()
     void begin();
          ^~~~~
C:\Users\vdw\AppData\Local\Arduino15\packages\arduino\hardware\avr\1.8.6\libraries\Wire\src/Wire.h:53:10: note:   candidate expects 0 arguments, 2 provided
C:\Users\vdw\AppData\Local\Arduino15\packages\arduino\hardware\avr\1.8.6\libraries\Wire\src/Wire.h:54:10: note: candidate: void TwoWire::begin(uint8_t)
     void begin(uint8_t);
          ^~~~~
C:\Users\vdw\AppData\Local\Arduino15\packages\arduino\hardware\avr\1.8.6\libraries\Wire\src/Wire.h:54:10: note:   candidate expects 1 argument, 2 provided
C:\Users\vdw\AppData\Local\Arduino15\packages\arduino\hardware\avr\1.8.6\libraries\Wire\src/Wire.h:55:10: note: candidate: void TwoWire::begin(int)
     void begin(int);
          ^~~~~
C:\Users\vdw\AppData\Local\Arduino15\packages\arduino\hardware\avr\1.8.6\libraries\Wire\src/Wire.h:55:10: note:   candidate expects 1 argument, 2 provided

exit status 1

Compilation error: exit status 1type or paste code here

Tried compiling the example they give in the library and get similar messages.

Please provide the link to where you downloaded the "RTC_DS1307" library from.

No. You are experiencing what I like to call a "problem stack", where there are multiple unrelated problems. This is a frustrating situation because when you fix one problem, it only gets you to the next problem. So it can seem like you are not making any progress. But if you stay persistent and solve each problem in turn, you will eventually achieve a working system.

Problem stacks can sometimes be avoided by working on a project incrementally, breaking the project into individual components and getting each component working perfectly before moving on to the next one. You will still experience problems at each step, but it is less likely you will have multiple problems stacked on top of each other. In other cases it is not possible to isolate the components and so we must expect to run into this situation from time to time when working on complex projects.

Thanks for your reply, I have persisted and won! I think I must have used or installed a wrong library. Anyway everything now compiles successfully and I can get on with using the new IDE. I do usually try to take and incremental approach, this time however I was transferring over a fairly large sketch from visual studio to Arduino IDE. Thanks very much for your help, refreshing to get such good assistance. Have the rest of the day off!

You are welcome. I'm glad it is working now.

Regards,
Per

This topic was automatically closed 180 days after the last reply. New replies are no longer allowed.