library issues

I dont always have problems with my arduinos but when I do they are library problems. I really have no comprehension of how to structure libraries so that they are found. I know its a basic issue but if someone could explain exactly where the libraries should go it would help me immensely. I have attached the error message below. Thanks.

Arduino: 1.8.9 (Windows Store 1.8.21.0) (Windows 10), Board: "Arduino/Genuino Uno"

In file included from C:\Users\owner\Documents\Arduino\libraries\IRLib2/IRLibAll.h:22:0,

from C:\Users\owner\Desktop\arduino\RoomControl180523thisoneworks\RoomControl180523thisoneworks.ino:1:

C:\Users\owner\Documents\Arduino\libraries\IRLib2/IRLibDecodeBase.h:13:28: fatal error: IRLibProtocols.h: No such file or directory

compilation terminated.

exit status 1
Error compiling for board Arduino/Genuino Uno.

This report would have more information with
"Show verbose output during compilation"
option enabled in File -> Preferences.

There are two LIBRARY locations.
There is one that is installed with some default libraries and another is inside the sketches folder.

You are more concerned with the one inside the sketches folder which is the primary location for USER ADDED libs.

Open the IDE and check the preferences to get the installed location of the sketches folder.
In my case I moved it to the D drive.

2019-11-18 at 23-15-24.jpg

2019-11-18 at 23-15-24.jpg

I don’t know what I don’t know so this makes describing it a problem. I use this program on a functioning arduino. I compiled it on one computer. It worked. I copied ALL of the file folders relating to arduino on that computer onto a flash drive. Downloaded to a new folder on my computer and it won’t compile giving the above message.

I don’t understand the library structure (apparently at all). So what I am looking for is what the tree should look like.

Sketch A is in a folder named Sketch A (as required for it to work)
The library mentioned should be in???
The Sketch A folder should be in???
They all should be in???

I have tried putting the library into the sketch A folder. Tried putting it in a folder that sketch a is in, tried putting in a folder named libraries in the same folder as sketch A. I don’t know where to put it. If I click in the sketch to add libraries all it does is add words in the sketch to include more libraries (it does not seem to download them and file them in a place that the sketch is capable of locating which seems like the logical outcome yet here we are).

Hopefully that answers more questions about what I am looking for.

@tinvestor

There are two LIBRARY locations.
There is one that is installed with some default libraries and another is inside the sketches folder.

You are more concerned with the one inside the sketches folder called "Libraries" which is the primary location for USER ADDED libs.

Open the IDE and check the preferences to get the installed location of the sketches folder.
In my case I moved it to the D drive.

2019-11-18 at 23-15-24.jpg

2019-11-19 at 12-12-39.jpg

Bob.

2019-11-19 at 12-12-39.jpg

Don’t mean to sound ungrateful but I need a far more basic breakdown here. You seem to have just repeated yourself. You added a screenshot that doesn’t really show where a library should be for a specific sketch. You seem to say they should be in two places yet your photo shows one folder that says libraries. If there is something you need to ask me or some specific screenshot you would like to see please be specific and I will try my best to provide more information.

I can’t get past the fact that I literally copied the exact folders in the exact format they were in and dropped them into a folder on my desktop and the program wouldn’t compile in spite of it being an exact clone of the other files.

The repeat was unintentional and came about when adding a second picture.

Did you open the PREFERENCES in the IDE ?
Did you take NOTE of the sketches location ?
Yours will probably be a different location to mine as I used my own path as already mentioned and shown in the pic which were just for general guidance.
Do you know what a path is in relationship to a computer ?
Do you know how to browse to follow a path as that is what you need to do to get to YOUR sketches folder ?

I organise (mostly) my sketches inside sub folders so all sketches beginning with "A" are in a subfolder simply called "A Sketches" and so on. So for example a sketch called "analogtest" would be inside a folder called "analogtest" That would be a subfolder inside the "A Sketches" folder which itself would be a subfolder of "Sketches"

So long as the sketches are also in thier OWN FOLDER eg. "Blink" sketch will be inside a folder called "Blink"
The folder name for the sketch must match the sketch name.

Libraries tend to follow a similar structure and the folder for LIBRARIES you may want to add is in a folder called Libraries that is also inside the SKETCHES folder.

They may contain additional folders with help files and usually a subfolder called "Examples".
More help with that HERE.

For a default setup, 3rd party libraries need to be in C:\Users\yourUserName\Documents\Arduino\libraries. The content looks like below (files omitted); C:. is the above libraries directory and the library names are marked in red

C:\Users\yourUserName\Documents\Arduino\libraries>tree /a
Folder PATH listing for volume Windows
Volume serial number is 0C5F-A8C6

C:.
[color=red]+---AccelStepper[/color]
|   +---examples
|   |   +---AFMotor_ConstantSpeed
|   |   +---AFMotor_MultiStepper
|   |   +---Blocking
|   |   +---Bounce
|   |   +---ConstantSpeed
|   |   +---DualMotorShield
|   |   +---MotorShield
|   |   +---MultipleSteppers
|   |   +---MultiStepper
|   |   +---Overshoot
|   |   +---ProportionalControl
|   |   +---Quickstop
|   |   \---Random
|   +---extras
|   |   \---doc
|   \---src
[color=red]+---Adafruit_GFX_Library[/color]
|   +---examples
|   |   \---mock_ili9341
|   +---fontconvert
|   \---Fonts
[color=red]+---Adafruit_SSD1306[/color]
|   \---examples
|       +---ssd1306_128x32_i2c
|       +---ssd1306_128x32_spi
|       +---ssd1306_128x64_i2c
|       \---ssd1306_128x64_spi
[color=red]+---arduino-modbus-slave-master[/color]
|   \---examples
|       \---MODBUSslave
[color=red]+---Button[/color]
|   \---Examples
|       \---Button
[color=red]+---FastLED[/color]
|   +---docs
|   +---examples
|   |   +---AnalogOutput
|   |   +---Blink
|   |   +---ColorPalette
|   |   +---ColorTemperature
|   |   +---Cylon
|   |   +---DemoReel100
|   |   +---Fire2012
|   |   +---Fire2012WithPalette
|   |   +---FirstLight
|   |   +---Multiple
|   |   |   +---ArrayOfLedArrays
|   |   |   +---MirroringSample
|   |   |   +---MultiArrays
|   |   |   +---MultipleStripsInOneArray
|   |   |   +---OctoWS2811Demo
|   |   |   \---ParallelOutputDemo
|   |   +---Noise
|   |   +---NoisePlayground
|   |   +---NoisePlusPalette
|   |   +---Pintest
|   |   +---Ports
|   |   |   \---PJRCSpectrumAnalyzer
|   |   +---RGBCalibrate
|   |   +---RGBSetDemo
|   |   +---SmartMatrix
|   |   \---XYMatrix
|   +---extras
|   +---lib8tion
|   \---platforms
|       +---arm
|       |   +---common
|       |   +---d21
|       |   +---k20
|       |   +---kl26
|       |   +---nrf51
|       |   +---sam
|       |   \---stm32
|       +---avr
|       \---esp
|           \---8266
[color=red]+---FontLEDClock[/color]
[color=red]+---HyperDisplay_SSD1309_ArduinoLibrary-master[/color]
|   +---examples
|   |   \---Example999_Testing
|   \---src
[color=red]+---HyperDisplay_UG2856KLBAG01_ArduinoLibrary-master[/color]
|   +---examples
|   |   +---Example1_DisplayTest
|   |   +---Example2_DrawingBasics
|   |   +---Example3_AdvancedFeatures
|   |   \---Example9_Volumetric_Requires10xDisplays
|   |       +---meshes
|   |       \---stls
|   \---src
[color=red]+---I2Cdev[/color]
[color=red]+---IRremote[/color]
|   \---examples
|       +---AiwaRCT501SendDemo
|       +---IRrecord
|       +---IRrecvDemo
|       +---IRrecvDump
|       +---IRrecvDumpV2
|       +---IRrelay
|       +---IRremoteInfo
|       +---IRsendDemo
|       +---IRsendRawDemo
|       +---IRtest
|       +---IRtest2
|       +---JVCPanasonicSendDemo
|       +---LegoPowerFunctionsSendDemo
|       +---LegoPowerFunctionsTests
|       \---LGACSendDemo
[color=red]+---Joystick[/color]
|   +---examples
|   |   +---DrivingControllerTest
|   |   +---FlightControllerTest
|   |   +---GamepadExample
|   |   +---HatSwitchTest
|   |   +---JoystickButton
|   |   +---JoystickKeyboard
|   |   +---JoystickTest
|   |   \---MultipleJoystickTest
|   \---src
|       \---DynamicHID
[color=red]+---Keypad[/color]
|   +---examples
|   |   +---CustomKeypad
|   |   +---DynamicKeypad
|   |   +---EventKeypad
|   |   +---HelloKeypad
|   |   +---HelloKeypad3
|   |   +---loopCounter
|   |   \---MultiKey
|   \---src
[color=red]+---MPU6050[/color]
|   \---examples
|       +---MPU6050_DMP6
|       |   \---Processing
|       |       \---MPUTeapot
|       +---MPU6050_DMP6_Ethernet
|       \---MPU6050_raw
[color=red]+---RTClib[/color]
|   \---examples
|       +---datecalc
|       +---ds1307
|       +---ds1307nvram
|       +---ds1307SqwPin
|       +---ds3231
|       +---pcf8523
|       +---softrtc
|       +---timestamp
|       \---toString
[color=red]+---SparkFun_HyperDisplay-master[/color]
|   +---examples
|   |   +---Example1_simpleBareNecessities
|   |   \---Example2_DisplayTestTemplate
|   +---src
|   |   \---util
|   \---templates
[color=red]\---TimerOne[/color]
    +---config
    \---examples
        +---FanSpeed
        \---Interrupt

tinvestor:
The library mentioned should be in???

C:\Users\owner\Documents\Arduino\libraries\IRLibProtocols

tinvestor:
The Sketch A folder should be in???

You can store sketches anywhere you like. It is convenient to put them in the sketchbook folder (as set by File > Preferences > Sketchbook location in the Arduino IDE) because then the sketch is available from the Arduino IDE's File > Sketchbook menu, but that is not required. It's only libraries that need to be installed to a specific location.

tinvestor:
If I click in the sketch to add libraries all it does is add words in the sketch to include more libraries (it does not seem to download them and file them in a place that the sketch is capable of locating which seems like the logical outcome yet here we are).

That feature only adds an #include directive for the header file(s) of the library to your sketch. It doesn't do anything else.