The verbose output shows the error while compiling the OneWire library. Some (Power)Shell trickery to make it easier to read that long command line, copied into clipboard
PS E:\> (Get-Clipboard -Raw) -replace ' (")?-', "`n `$1-"
Compiling library "OneWire"
"C:\\Users\\mfulw\\AppData\\Local\\Arduino15\\packages\\arduino\\tools\\avr-gcc\\7.3.0-atmel3.6.1-arduino7/bin/avr-g++"
-c
-g
-Os
-w
-std=gnu++11
-fpermissive
-fno-exceptions
-ffunction-sections
-fdata-sections
-fno-threadsafe-statics
-Wno-error=narrowing
-MMD
-flto
-mmcu=atmega2560
-DF_CPU=16000000L
-DARDUINO=10607
-DARDUINO_AVR_MEGA2560
-DARDUINO_ARCH_AVR
"-IC:\\Users\\mfulw\\AppData\\Local\\Arduino15\\packages\\arduino\\hardware\\avr\\1.8.8\\cores\\arduino"
"-IC:\\Users\\mfulw\\AppData\\Local\\Arduino15\\packages\\arduino\\hardware\\avr\\1.8.8\\variants\\mega"
"-Ih:\\Arduino\\libraries\\DallasTemperature"
"-Ih:\\Arduino\\libraries\\OneWire"
"-Ih:\\Arduino\\libraries\\ModbusMaster\\src"
"-IC:\\Users\\mfulw\\AppData\\Local\\Arduino15\\packages\\arduino\\hardware\\avr\\1.8.8\\libraries\\SPI\\src"
"-Ih:\\Arduino\\libraries\\Ethernet3\\src"
"-Ih:\\Arduino\\libraries\\PubSubClient3\\src" "h:\\Arduino\\libraries\\OneWire\\OneWire.cpp"
-o "C:\\Users\\mfulw\\AppData\\Local\\arduino\\sketches\\8A1D56E9C7DA08E9F03591F926327E8A\\libraries\\OneWire\\OneWire.cpp.o"
All the quoted -I arguments near the end are for each of the discovered libraries. Compiling the bare-bones sketch, as in your original screenshot
#include <OneWire.h>
void setup() {}
void loop() {}
I get -- with no errors
PS E:\> (Get-Clipboard -Raw) -replace ' (")?-', "`n `$1-"
Compiling library "OneWire"
"E:\\Arduino15\\packages\\arduino\\tools\\avr-gcc\\7.3.0-atmel3.6.1-arduino7/bin/avr-g++"
-c
-g
-Os
-std=gnu++11
-fpermissive
-fno-exceptions
-ffunction-sections
-fdata-sections
-fno-threadsafe-statics
-Wno-error=narrowing
-MMD
-flto
-mmcu=atmega328p
-DF_CPU=16000000L
-DARDUINO=10607
-DARDUINO_AVR_UNO
-DARDUINO_ARCH_AVR
"-IE:\\Arduino15\\packages\\arduino\\hardware\\avr\\1.8.8\\cores\\arduino"
"-IE:\\Arduino15\\packages\\arduino\\hardware\\avr\\1.8.8\\variants\\standard"
"-Ie:\\Sketchbook\\libraries\\OneWire" "e:\\Sketchbook\\libraries\\OneWire\\OneWire.cpp"
-o "C:\\Users\\kenb4\\AppData\\Local\\arduino\\sketches\\8F878A94A3E5D2DFB05FBC29BBC878B4\\libraries\\OneWire\\OneWire.cpp.o"
The differences include you turning off warnings with -w (not recommended, but unlikely the issue)
Compiling library "OneWire"
-"C:\\Users\\mfulw\\AppData\\Local\\Arduino15\\packages\\arduino\\tools\\avr-gcc\\7.3.0-atmel3.6.1-arduino7/bin/avr-g++"
+"E:\\Arduino15\\packages\\arduino\\tools\\avr-gcc\\7.3.0-atmel3.6.1-arduino7/bin/avr-g++"
-c
-g
-Os
- -w
-std=gnu++11
-fpermissive
-fno-exceptions
@@ -19,12 +18,7 @@
-DARDUINO=10607
-DARDUINO_AVR_MEGA2560
-DARDUINO_ARCH_AVR
- "-IC:\\Users\\mfulw\\AppData\\Local\\Arduino15\\packages\\arduino\\hardware\\avr\\1.8.8\\cores\\arduino"
- "-IC:\\Users\\mfulw\\AppData\\Local\\Arduino15\\packages\\arduino\\hardware\\avr\\1.8.8\\variants\\mega"
- "-Ih:\\Arduino\\libraries\\DallasTemperature"
- "-Ih:\\Arduino\\libraries\\OneWire"
- "-Ih:\\Arduino\\libraries\\ModbusMaster\\src"
- "-IC:\\Users\\mfulw\\AppData\\Local\\Arduino15\\packages\\arduino\\hardware\\avr\\1.8.8\\libraries\\SPI\\src"
- "-Ih:\\Arduino\\libraries\\Ethernet3\\src"
- "-Ih:\\Arduino\\libraries\\PubSubClient3\\src" "h:\\Arduino\\libraries\\OneWire\\OneWire.cpp"
- -o "C:\\Users\\mfulw\\AppData\\Local\\arduino\\sketches\\8A1D56E9C7DA08E9F03591F926327E8A\\libraries\\OneWire\\OneWire.cpp.o"
+ "-IE:\\Arduino15\\packages\\arduino\\hardware\\avr\\1.8.8\\cores\\arduino"
+ "-IE:\\Arduino15\\packages\\arduino\\hardware\\avr\\1.8.8\\variants\\mega"
+ "-Ie:\\Sketchbook\\libraries\\OneWire" "e:\\Sketchbook\\libraries\\OneWire\\OneWire.cpp"
+ -o "C:\\Users\\kenb4\\AppData\\Local\\arduino\\sketches\\8F878A94A3E5D2DFB05FBC29BBC878B4\\libraries\\OneWire\\OneWire.cpp.o"
And all the differences in the end look OK. Stripping out the drive paths, so they start with packages for the board, and libraries
-DARDUINO_ARCH_AVR
"-I\\packages\\arduino\\hardware\\avr\\1.8.8\\cores\\arduino"
"-I\\packages\\arduino\\hardware\\avr\\1.8.8\\variants\\mega"
- "-I\\libraries\\DallasTemperature"
- "-I\\libraries\\OneWire"
- "-I\\libraries\\ModbusMaster\\src"
- "-I\\packages\\arduino\\hardware\\avr\\1.8.8\\libraries\\SPI\\src"
- "-I\\libraries\\Ethernet3\\src"
- "-I\\libraries\\PubSubClient3\\src" "h:\\Arduino\\libraries\\OneWire\\OneWire.cpp"
- -o "C:\\Users\\mfulw\\AppData\\Local\\arduino\\sketches\\8A1D56E9C7DA08E9F03591F926327E8A\\libraries\\OneWire\\OneWire.cpp.o"
+ "-I\\libraries\\OneWire" "e:\\Sketchbook\\libraries\\OneWire\\OneWire.cpp"
+ -o "C:\\Users\\kenb4\\AppData\\Local\\arduino\\sketches\\8F878A94A3E5D2DFB05FBC29BBC878B4\\libraries\\OneWire\\OneWire.cpp.o"
Note that OneWire.cpp, the file actually being compiled, is the second "word" on the line above the last, which starts -o. The difference is also in the order of the libraries. Again, with a bare-bones sketch, those differences should disappear. If it continues to fail as you showed originally, then what?
I'm not sure how well it will work if the compile fails. But for my working bare-bones sketch, right-clicking on the #include line and choosing Go to Definition, it opens OneWire.h, which starts with
#ifndef OneWire_h
#define OneWire_h
#ifdef __cplusplus
#include <stdint.h>
#if defined(__AVR__)
#include <util/crc16.h>
#endif
Hovering over that <util/crc16.h> shows the full path in a tooltip
This is not under one of the listed optional paths with -I; it's a built-in automatic one. That 7.3.0-atmel3.6.1-arduino7 directory also contains the avr-g++ "compiler driver", which is the executable file at the beginning of those giant commands. Go to Definition may open it; if not, you can find the file. The part we're interested in starts at line 112
static __inline__ uint16_t
_crc16_update(uint16_t __crc, uint8_t __data)
{
The declared function name starts with an underscore. When you got the error, the compiler suggested the same name without the first underscore.
So if you get that error again, what does that file actually say at that moment? Finally, you can try an even simpler sketch with no libraries to call that function directly
#include <util/crc16.h>
void setup() {
uint16_t crc = 11;
uint8_t data = 22;
_crc16_update(crc, data);
}
void loop() {}
Does that compile?