No matching function for call to

Hi

Output log:


FQBN: arduino:avr:mega
Using board 'mega' from platform in folder: C:\Users\Kasra\AppData\Local\Arduino15\packages\arduino\hardware\avr\1.8.6
Using core 'arduino' from platform in folder: C:\Users\Kasra\AppData\Local\Arduino15\packages\arduino\hardware\avr\1.8.6

Detecting libraries used...
C:\Users\Kasra\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 -flto -w -x c++ -E -CC -mmcu=atmega2560 -DF_CPU=16000000L -DARDUINO=10607 -DARDUINO_AVR_MEGA2560 -DARDUINO_ARCH_AVR -IC:\Users\Kasra\AppData\Local\Arduino15\packages\arduino\hardware\avr\1.8.6\cores\arduino -IC:\Users\Kasra\AppData\Local\Arduino15\packages\arduino\hardware\avr\1.8.6\variants\mega C:\Users\Kasra\AppData\Local\Temp\arduino\sketches\23803ADD1A1859CC4B01C98B9EAEDD4A\sketch\sketch_jul15b.ino.cpp -o nul
Alternatives for SPI.h: [SPI@1.0]
ResolveLibrary(SPI.h)
  -> candidates: [SPI@1.0]
C:\Users\Kasra\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 -flto -w -x c++ -E -CC -mmcu=atmega2560 -DF_CPU=16000000L -DARDUINO=10607 -DARDUINO_AVR_MEGA2560 -DARDUINO_ARCH_AVR -IC:\Users\Kasra\AppData\Local\Arduino15\packages\arduino\hardware\avr\1.8.6\cores\arduino -IC:\Users\Kasra\AppData\Local\Arduino15\packages\arduino\hardware\avr\1.8.6\variants\mega -IC:\Users\Kasra\AppData\Local\Arduino15\packages\arduino\hardware\avr\1.8.6\libraries\SPI\src C:\Users\Kasra\AppData\Local\Temp\arduino\sketches\23803ADD1A1859CC4B01C98B9EAEDD4A\sketch\sketch_jul15b.ino.cpp -o nul
Alternatives for Wire.h: [Wire@1.0]
ResolveLibrary(Wire.h)
  -> candidates: [Wire@1.0]
C:\Users\Kasra\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 -flto -w -x c++ -E -CC -mmcu=atmega2560 -DF_CPU=16000000L -DARDUINO=10607 -DARDUINO_AVR_MEGA2560 -DARDUINO_ARCH_AVR -IC:\Users\Kasra\AppData\Local\Arduino15\packages\arduino\hardware\avr\1.8.6\cores\arduino -IC:\Users\Kasra\AppData\Local\Arduino15\packages\arduino\hardware\avr\1.8.6\variants\mega -IC:\Users\Kasra\AppData\Local\Arduino15\packages\arduino\hardware\avr\1.8.6\libraries\SPI\src -IC:\Users\Kasra\AppData\Local\Arduino15\packages\arduino\hardware\avr\1.8.6\libraries\Wire\src C:\Users\Kasra\AppData\Local\Temp\arduino\sketches\23803ADD1A1859CC4B01C98B9EAEDD4A\sketch\sketch_jul15b.ino.cpp -o nul
Alternatives for Adafruit_GFX.h: [Adafruit GFX Library@1.11.9]
ResolveLibrary(Adafruit_GFX.h)
  -> candidates: [Adafruit GFX Library@1.11.9]
C:\Users\Kasra\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 -flto -w -x c++ -E -CC -mmcu=atmega2560 -DF_CPU=16000000L -DARDUINO=10607 -DARDUINO_AVR_MEGA2560 -DARDUINO_ARCH_AVR -IC:\Users\Kasra\AppData\Local\Arduino15\packages\arduino\hardware\avr\1.8.6\cores\arduino -IC:\Users\Kasra\AppData\Local\Arduino15\packages\arduino\hardware\avr\1.8.6\variants\mega -IC:\Users\Kasra\AppData\Local\Arduino15\packages\arduino\hardware\avr\1.8.6\libraries\SPI\src -IC:\Users\Kasra\AppData\Local\Arduino15\packages\arduino\hardware\avr\1.8.6\libraries\Wire\src -IC:\Users\Kasra\Documents\Arduino\libraries\Adafruit_GFX_Library C:\Users\Kasra\AppData\Local\Temp\arduino\sketches\23803ADD1A1859CC4B01C98B9EAEDD4A\sketch\sketch_jul15b.ino.cpp -o nul
Alternatives for Adafruit_I2CDevice.h: [Adafruit BusIO@1.16.1]
ResolveLibrary(Adafruit_I2CDevice.h)
  -> candidates: [Adafruit BusIO@1.16.1]
C:\Users\Kasra\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 -flto -w -x c++ -E -CC -mmcu=atmega2560 -DF_CPU=16000000L -DARDUINO=10607 -DARDUINO_AVR_MEGA2560 -DARDUINO_ARCH_AVR -IC:\Users\Kasra\AppData\Local\Arduino15\packages\arduino\hardware\avr\1.8.6\cores\arduino -IC:\Users\Kasra\AppData\Local\Arduino15\packages\arduino\hardware\avr\1.8.6\variants\mega -IC:\Users\Kasra\AppData\Local\Arduino15\packages\arduino\hardware\avr\1.8.6\libraries\SPI\src -IC:\Users\Kasra\AppData\Local\Arduino15\packages\arduino\hardware\avr\1.8.6\libraries\Wire\src -IC:\Users\Kasra\Documents\Arduino\libraries\Adafruit_GFX_Library -IC:\Users\Kasra\Documents\Arduino\libraries\Adafruit_BusIO C:\Users\Kasra\AppData\Local\Temp\arduino\sketches\23803ADD1A1859CC4B01C98B9EAEDD4A\sketch\sketch_jul15b.ino.cpp -o nul
Alternatives for Adafruit_SSD1351.h: [Adafruit SSD1351 library@1.3.2]
ResolveLibrary(Adafruit_SSD1351.h)
  -> candidates: [Adafruit SSD1351 library@1.3.2]
C:\Users\Kasra\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 -flto -w -x c++ -E -CC -mmcu=atmega2560 -DF_CPU=16000000L -DARDUINO=10607 -DARDUINO_AVR_MEGA2560 -DARDUINO_ARCH_AVR -IC:\Users\Kasra\AppData\Local\Arduino15\packages\arduino\hardware\avr\1.8.6\cores\arduino -IC:\Users\Kasra\AppData\Local\Arduino15\packages\arduino\hardware\avr\1.8.6\variants\mega -IC:\Users\Kasra\AppData\Local\Arduino15\packages\arduino\hardware\avr\1.8.6\libraries\SPI\src -IC:\Users\Kasra\AppData\Local\Arduino15\packages\arduino\hardware\avr\1.8.6\libraries\Wire\src -IC:\Users\Kasra\Documents\Arduino\libraries\Adafruit_GFX_Library -IC:\Users\Kasra\Documents\Arduino\libraries\Adafruit_BusIO -IC:\Users\Kasra\Documents\Arduino\libraries\Adafruit_SSD1351_library C:\Users\Kasra\AppData\Local\Temp\arduino\sketches\23803ADD1A1859CC4B01C98B9EAEDD4A\sketch\sketch_jul15b.ino.cpp -o nul
C:\Users\Kasra\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 -flto -w -x c++ -E -CC -mmcu=atmega2560 -DF_CPU=16000000L -DARDUINO=10607 -DARDUINO_AVR_MEGA2560 -DARDUINO_ARCH_AVR -IC:\Users\Kasra\AppData\Local\Arduino15\packages\arduino\hardware\avr\1.8.6\cores\arduino -IC:\Users\Kasra\AppData\Local\Arduino15\packages\arduino\hardware\avr\1.8.6\variants\mega -IC:\Users\Kasra\AppData\Local\Arduino15\packages\arduino\hardware\avr\1.8.6\libraries\SPI\src -IC:\Users\Kasra\AppData\Local\Arduino15\packages\arduino\hardware\avr\1.8.6\libraries\Wire\src -IC:\Users\Kasra\Documents\Arduino\libraries\Adafruit_GFX_Library -IC:\Users\Kasra\Documents\Arduino\libraries\Adafruit_BusIO -IC:\Users\Kasra\Documents\Arduino\libraries\Adafruit_SSD1351_library C:\Users\Kasra\AppData\Local\Arduino15\packages\arduino\hardware\avr\1.8.6\libraries\SPI\src\SPI.cpp -o nul
C:\Users\Kasra\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 -flto -w -x c++ -E -CC -mmcu=atmega2560 -DF_CPU=16000000L -DARDUINO=10607 -DARDUINO_AVR_MEGA2560 -DARDUINO_ARCH_AVR -IC:\Users\Kasra\AppData\Local\Arduino15\packages\arduino\hardware\avr\1.8.6\cores\arduino -IC:\Users\Kasra\AppData\Local\Arduino15\packages\arduino\hardware\avr\1.8.6\variants\mega -IC:\Users\Kasra\AppData\Local\Arduino15\packages\arduino\hardware\avr\1.8.6\libraries\SPI\src -IC:\Users\Kasra\AppData\Local\Arduino15\packages\arduino\hardware\avr\1.8.6\libraries\Wire\src -IC:\Users\Kasra\Documents\Arduino\libraries\Adafruit_GFX_Library -IC:\Users\Kasra\Documents\Arduino\libraries\Adafruit_BusIO -IC:\Users\Kasra\Documents\Arduino\libraries\Adafruit_SSD1351_library C:\Users\Kasra\AppData\Local\Arduino15\packages\arduino\hardware\avr\1.8.6\libraries\Wire\src\Wire.cpp -o nul
C:\Users\Kasra\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 -flto -w -x c++ -E -CC -mmcu=atmega2560 -DF_CPU=16000000L -DARDUINO=10607 -DARDUINO_AVR_MEGA2560 -DARDUINO_ARCH_AVR -IC:\Users\Kasra\AppData\Local\Arduino15\packages\arduino\hardware\avr\1.8.6\cores\arduino -IC:\Users\Kasra\AppData\Local\Arduino15\packages\arduino\hardware\avr\1.8.6\variants\mega -IC:\Users\Kasra\AppData\Local\Arduino15\packages\arduino\hardware\avr\1.8.6\libraries\SPI\src -IC:\Users\Kasra\AppData\Local\Arduino15\packages\arduino\hardware\avr\1.8.6\libraries\Wire\src -IC:\Users\Kasra\Documents\Arduino\libraries\Adafruit_GFX_Library -IC:\Users\Kasra\Documents\Arduino\libraries\Adafruit_BusIO -IC:\Users\Kasra\Documents\Arduino\libraries\Adafruit_SSD1351_library C:\Users\Kasra\AppData\Local\Arduino15\packages\arduino\hardware\avr\1.8.6\libraries\Wire\src\utility\twi.c -o nul
C:\Users\Kasra\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 -flto -w -x c++ -E -CC -mmcu=atmega2560 -DF_CPU=16000000L -DARDUINO=10607 -DARDUINO_AVR_MEGA2560 -DARDUINO_ARCH_AVR -IC:\Users\Kasra\AppData\Local\Arduino15\packages\arduino\hardware\avr\1.8.6\cores\arduino -IC:\Users\Kasra\AppData\Local\Arduino15\packages\arduino\hardware\avr\1.8.6\variants\mega -IC:\Users\Kasra\AppData\Local\Arduino15\packages\arduino\hardware\avr\1.8.6\libraries\SPI\src -IC:\Users\Kasra\AppData\Local\Arduino15\packages\arduino\hardware\avr\1.8.6\libraries\Wire\src -IC:\Users\Kasra\Documents\Arduino\libraries\Adafruit_GFX_Library -IC:\Users\Kasra\Documents\Arduino\libraries\Adafruit_BusIO -IC:\Users\Kasra\Documents\Arduino\libraries\Adafruit_SSD1351_library C:\Users\Kasra\Documents\Arduino\libraries\Adafruit_GFX_Library\Adafruit_GFX.cpp -o nul
C:\Users\Kasra\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 -flto -w -x c++ -E -CC -mmcu=atmega2560 -DF_CPU=16000000L -DARDUINO=10607 -DARDUINO_AVR_MEGA2560 -DARDUINO_ARCH_AVR -IC:\Users\Kasra\AppData\Local\Arduino15\packages\arduino\hardware\avr\1.8.6\cores\arduino -IC:\Users\Kasra\AppData\Local\Arduino15\packages\arduino\hardware\avr\1.8.6\variants\mega -IC:\Users\Kasra\AppData\Local\Arduino15\packages\arduino\hardware\avr\1.8.6\libraries\SPI\src -IC:\Users\Kasra\AppData\Local\Arduino15\packages\arduino\hardware\avr\1.8.6\libraries\Wire\src -IC:\Users\Kasra\Documents\Arduino\libraries\Adafruit_GFX_Library -IC:\Users\Kasra\Documents\Arduino\libraries\Adafruit_BusIO -IC:\Users\Kasra\Documents\Arduino\libraries\Adafruit_SSD1351_library C:\Users\Kasra\Documents\Arduino\libraries\Adafruit_GFX_Library\Adafruit_GrayOLED.cpp -o nul
C:\Users\Kasra\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 -flto -w -x c++ -E -CC -mmcu=atmega2560 -DF_CPU=16000000L -DARDUINO=10607 -DARDUINO_AVR_MEGA2560 -DARDUINO_ARCH_AVR -IC:\Users\Kasra\AppData\Local\Arduino15\packages\arduino\hardware\avr\1.8.6\cores\arduino -IC:\Users\Kasra\AppData\Local\Arduino15\packages\arduino\hardware\avr\1.8.6\variants\mega -IC:\Users\Kasra\AppData\Local\Arduino15\packages\arduino\hardware\avr\1.8.6\libraries\SPI\src -IC:\Users\Kasra\AppData\Local\Arduino15\packages\arduino\hardware\avr\1.8.6\libraries\Wire\src -IC:\Users\Kasra\Documents\Arduino\libraries\Adafruit_GFX_Library -IC:\Users\Kasra\Documents\Arduino\libraries\Adafruit_BusIO -IC:\Users\Kasra\Documents\Arduino\libraries\Adafruit_SSD1351_library C:\Users\Kasra\Documents\Arduino\libraries\Adafruit_GFX_Library\Adafruit_SPITFT.cpp -o nul
C:\Users\Kasra\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 -flto -w -x c++ -E -CC -mmcu=atmega2560 -DF_CPU=16000000L -DARDUINO=10607 -DARDUINO_AVR_MEGA2560 -DARDUINO_ARCH_AVR -IC:\Users\Kasra\AppData\Local\Arduino15\packages\arduino\hardware\avr\1.8.6\cores\arduino -IC:\Users\Kasra\AppData\Local\Arduino15\packages\arduino\hardware\avr\1.8.6\variants\mega -IC:\Users\Kasra\AppData\Local\Arduino15\packages\arduino\hardware\avr\1.8.6\libraries\SPI\src -IC:\Users\Kasra\AppData\Local\Arduino15\packages\arduino\hardware\avr\1.8.6\libraries\Wire\src -IC:\Users\Kasra\Documents\Arduino\libraries\Adafruit_GFX_Library -IC:\Users\Kasra\Documents\Arduino\libraries\Adafruit_BusIO -IC:\Users\Kasra\Documents\Arduino\libraries\Adafruit_SSD1351_library C:\Users\Kasra\Documents\Arduino\libraries\Adafruit_GFX_Library\glcdfont.c -o nul
C:\Users\Kasra\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 -flto -w -x c++ -E -CC -mmcu=atmega2560 -DF_CPU=16000000L -DARDUINO=10607 -DARDUINO_AVR_MEGA2560 -DARDUINO_ARCH_AVR -IC:\Users\Kasra\AppData\Local\Arduino15\packages\arduino\hardware\avr\1.8.6\cores\arduino -IC:\Users\Kasra\AppData\Local\Arduino15\packages\arduino\hardware\avr\1.8.6\variants\mega -IC:\Users\Kasra\AppData\Local\Arduino15\packages\arduino\hardware\avr\1.8.6\libraries\SPI\src -IC:\Users\Kasra\AppData\Local\Arduino15\packages\arduino\hardware\avr\1.8.6\libraries\Wire\src -IC:\Users\Kasra\Documents\Arduino\libraries\Adafruit_GFX_Library -IC:\Users\Kasra\Documents\Arduino\libraries\Adafruit_BusIO -IC:\Users\Kasra\Documents\Arduino\libraries\Adafruit_SSD1351_library C:\Users\Kasra\Documents\Arduino\libraries\Adafruit_BusIO\Adafruit_BusIO_Register.cpp -o nul
C:\Users\Kasra\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 -flto -w -x c++ -E -CC -mmcu=atmega2560 -DF_CPU=16000000L -DARDUINO=10607 -DARDUINO_AVR_MEGA2560 -DARDUINO_ARCH_AVR -IC:\Users\Kasra\AppData\Local\Arduino15\packages\arduino\hardware\avr\1.8.6\cores\arduino -IC:\Users\Kasra\AppData\Local\Arduino15\packages\arduino\hardware\avr\1.8.6\variants\mega -IC:\Users\Kasra\AppData\Local\Arduino15\packages\arduino\hardware\avr\1.8.6\libraries\SPI\src -IC:\Users\Kasra\AppData\Local\Arduino15\packages\arduino\hardware\avr\1.8.6\libraries\Wire\src -IC:\Users\Kasra\Documents\Arduino\libraries\Adafruit_GFX_Library -IC:\Users\Kasra\Documents\Arduino\libraries\Adafruit_BusIO -IC:\Users\Kasra\Documents\Arduino\libraries\Adafruit_SSD1351_library C:\Users\Kasra\Documents\Arduino\libraries\Adafruit_BusIO\Adafruit_I2CDevice.cpp -o nul
C:\Users\Kasra\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 -flto -w -x c++ -E -CC -mmcu=atmega2560 -DF_CPU=16000000L -DARDUINO=10607 -DARDUINO_AVR_MEGA2560 -DARDUINO_ARCH_AVR -IC:\Users\Kasra\AppData\Local\Arduino15\packages\arduino\hardware\avr\1.8.6\cores\arduino -IC:\Users\Kasra\AppData\Local\Arduino15\packages\arduino\hardware\avr\1.8.6\variants\mega -IC:\Users\Kasra\AppData\Local\Arduino15\packages\arduino\hardware\avr\1.8.6\libraries\SPI\src -IC:\Users\Kasra\AppData\Local\Arduino15\packages\arduino\hardware\avr\1.8.6\libraries\Wire\src -IC:\Users\Kasra\Documents\Arduino\libraries\Adafruit_GFX_Library -IC:\Users\Kasra\Documents\Arduino\libraries\Adafruit_BusIO -IC:\Users\Kasra\Documents\Arduino\libraries\Adafruit_SSD1351_library C:\Users\Kasra\Documents\Arduino\libraries\Adafruit_BusIO\Adafruit_SPIDevice.cpp -o nul
C:\Users\Kasra\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 -flto -w -x c++ -E -CC -mmcu=atmega2560 -DF_CPU=16000000L -DARDUINO=10607 -DARDUINO_AVR_MEGA2560 -DARDUINO_ARCH_AVR -IC:\Users\Kasra\AppData\Local\Arduino15\packages\arduino\hardware\avr\1.8.6\cores\arduino -IC:\Users\Kasra\AppData\Local\Arduino15\packages\arduino\hardware\avr\1.8.6\variants\mega -IC:\Users\Kasra\AppData\Local\Arduino15\packages\arduino\hardware\avr\1.8.6\libraries\SPI\src -IC:\Users\Kasra\AppData\Local\Arduino15\packages\arduino\hardware\avr\1.8.6\libraries\Wire\src -IC:\Users\Kasra\Documents\Arduino\libraries\Adafruit_GFX_Library -IC:\Users\Kasra\Documents\Arduino\libraries\Adafruit_BusIO -IC:\Users\Kasra\Documents\Arduino\libraries\Adafruit_SSD1351_library C:\Users\Kasra\Documents\Arduino\libraries\Adafruit_SSD1351_library\Adafruit_SSD1351.cpp -o nul
Generating function prototypes...
C:\Users\Kasra\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 -flto -w -x c++ -E -CC -mmcu=atmega2560 -DF_CPU=16000000L -DARDUINO=10607 -DARDUINO_AVR_MEGA2560 -DARDUINO_ARCH_AVR -IC:\Users\Kasra\AppData\Local\Arduino15\packages\arduino\hardware\avr\1.8.6\cores\arduino -IC:\Users\Kasra\AppData\Local\Arduino15\packages\arduino\hardware\avr\1.8.6\variants\mega -IC:\Users\Kasra\AppData\Local\Arduino15\packages\arduino\hardware\avr\1.8.6\libraries\SPI\src -IC:\Users\Kasra\AppData\Local\Arduino15\packages\arduino\hardware\avr\1.8.6\libraries\Wire\src -IC:\Users\Kasra\Documents\Arduino\libraries\Adafruit_GFX_Library -IC:\Users\Kasra\Documents\Arduino\libraries\Adafruit_BusIO -IC:\Users\Kasra\Documents\Arduino\libraries\Adafruit_SSD1351_library C:\Users\Kasra\AppData\Local\Temp\arduino\sketches\23803ADD1A1859CC4B01C98B9EAEDD4A\sketch\sketch_jul15b.ino.cpp -o C:\Users\Kasra\AppData\Local\Temp\880041603\sketch_merged.cpp
C:\Users\Kasra\AppData\Local\Arduino15\packages\builtin\tools\ctags\5.8-arduino11/ctags -u --language-force=c++ -f - --c++-kinds=svpf --fields=KSTtzns --line-directives C:\Users\Kasra\AppData\Local\Temp\880041603\sketch_merged.cpp
Compiling sketch...
"C:\\Users\\Kasra\\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\\Kasra\\AppData\\Local\\Arduino15\\packages\\arduino\\hardware\\avr\\1.8.6\\cores\\arduino" "-IC:\\Users\\Kasra\\AppData\\Local\\Arduino15\\packages\\arduino\\hardware\\avr\\1.8.6\\variants\\mega" "-IC:\\Users\\Kasra\\AppData\\Local\\Arduino15\\packages\\arduino\\hardware\\avr\\1.8.6\\libraries\\SPI\\src" "-IC:\\Users\\Kasra\\AppData\\Local\\Arduino15\\packages\\arduino\\hardware\\avr\\1.8.6\\libraries\\Wire\\src" "-IC:\\Users\\Kasra\\Documents\\Arduino\\libraries\\Adafruit_GFX_Library" "-IC:\\Users\\Kasra\\Documents\\Arduino\\libraries\\Adafruit_BusIO" "-IC:\\Users\\Kasra\\Documents\\Arduino\\libraries\\Adafruit_SSD1351_library" "C:\\Users\\Kasra\\AppData\\Local\\Temp\\arduino\\sketches\\23803ADD1A1859CC4B01C98B9EAEDD4A\\sketch\\sketch_jul15b.ino.cpp" -o "C:\\Users\\Kasra\\AppData\\Local\\Temp\\arduino\\sketches\\23803ADD1A1859CC4B01C98B9EAEDD4A\\sketch\\sketch_jul15b.ino.cpp.o"
C:\Users\Kasra\AppData\Local\Temp\.arduinoIDE-unsaved2024615-43736-w4bdpv.tt62a\sketch_jul15b\sketch_jul15b.ino:7:36: error: no matching function for call to 'Adafruit_SSD1351::Adafruit_SSD1351(int)'
 Adafruit_SSD1351 display(OLED_RESET);
                                    ^
In file included from C:\Users\Kasra\AppData\Local\Temp\.arduinoIDE-unsaved2024615-43736-w4bdpv.tt62a\sketch_jul15b\sketch_jul15b.ino:4:0:
C:\Users\Kasra\Documents\Arduino\libraries\Adafruit_SSD1351_library/Adafruit_SSD1351.h:93:3: note: candidate: Adafruit_SSD1351::Adafruit_SSD1351(int8_t, int8_t, int8_t)
   Adafruit_SSD1351(int8_t cs_pin, int8_t dc_pin, int8_t rst_pin = -1);
   ^~~~~~~~~~~~~~~~
C:\Users\Kasra\Documents\Arduino\libraries\Adafruit_SSD1351_library/Adafruit_SSD1351.h:93:3: note:   candidate expects 3 arguments, 1 provided
C:\Users\Kasra\Documents\Arduino\libraries\Adafruit_SSD1351_library/Adafruit_SSD1351.h:90:3: note: candidate: Adafruit_SSD1351::Adafruit_SSD1351(int8_t, int8_t, int8_t, int8_t, int8_t)
   Adafruit_SSD1351(int8_t cs_pin, int8_t dc_pin, int8_t mosi_pin,
   ^~~~~~~~~~~~~~~~
C:\Users\Kasra\Documents\Arduino\libraries\Adafruit_SSD1351_library/Adafruit_SSD1351.h:90:3: note:   candidate expects 5 arguments, 1 provided
C:\Users\Kasra\Documents\Arduino\libraries\Adafruit_SSD1351_library/Adafruit_SSD1351.h:85:3: note: candidate: Adafruit_SSD1351::Adafruit_SSD1351(uint16_t, uint16_t, SPIClass*, int8_t, int8_t, int8_t)
   Adafruit_SSD1351(uint16_t width, uint16_t height, SPIClass *spi,
   ^~~~~~~~~~~~~~~~
C:\Users\Kasra\Documents\Arduino\libraries\Adafruit_SSD1351_library/Adafruit_SSD1351.h:85:3: note:   candidate expects 6 arguments, 1 provided
C:\Users\Kasra\Documents\Arduino\libraries\Adafruit_SSD1351_library/Adafruit_SSD1351.h:81:3: note: candidate: Adafruit_SSD1351::Adafruit_SSD1351(uint16_t, uint16_t, int8_t, int8_t, int8_t, int8_t, int8_t)
   Adafruit_SSD1351(uint16_t width, uint16_t height, int8_t cs_pin,
   ^~~~~~~~~~~~~~~~
C:\Users\Kasra\Documents\Arduino\libraries\Adafruit_SSD1351_library/Adafruit_SSD1351.h:81:3: note:   candidate expects 7 arguments, 1 provided
C:\Users\Kasra\Documents\Arduino\libraries\Adafruit_SSD1351_library/Adafruit_SSD1351.h:77:7: note: candidate: constexpr Adafruit_SSD1351::Adafruit_SSD1351(const Adafruit_SSD1351&)
 class Adafruit_SSD1351 : public Adafruit_SPITFT {
       ^~~~~~~~~~~~~~~~
C:\Users\Kasra\Documents\Arduino\libraries\Adafruit_SSD1351_library/Adafruit_SSD1351.h:77:7: note:   no known conversion for argument 1 from 'int' to 'const Adafruit_SSD1351&'
C:\Users\Kasra\AppData\Local\Temp\.arduinoIDE-unsaved2024615-43736-w4bdpv.tt62a\sketch_jul15b\sketch_jul15b.ino: In function 'void setup()':
C:\Users\Kasra\AppData\Local\Temp\.arduinoIDE-unsaved2024615-43736-w4bdpv.tt62a\sketch_jul15b\sketch_jul15b.ino:18:19: error: 'SSD1351_SWITCHCAPVCC' was not declared in this scope
     display.begin(SSD1351_SWITCHCAPVCC, SCREEN_ADDRESS);
                   ^~~~~~~~~~~~~~~~~~~~
C:\Users\Kasra\AppData\Local\Temp\.arduinoIDE-unsaved2024615-43736-w4bdpv.tt62a\sketch_jul15b\sketch_jul15b.ino:18:19: note: suggested alternative: 'SSD1351WIDTH'
     display.begin(SSD1351_SWITCHCAPVCC, SCREEN_ADDRESS);
                   ^~~~~~~~~~~~~~~~~~~~
                   SSD1351WIDTH
C:\Users\Kasra\AppData\Local\Temp\.arduinoIDE-unsaved2024615-43736-w4bdpv.tt62a\sketch_jul15b\sketch_jul15b.ino:19:14: error: 'class Adafruit_SSD1351' has no member named 'clearDisplay'; did you mean 'invertDisplay'?
      display.clearDisplay();
              ^~~~~~~~~~~~
              invertDisplay
C:\Users\Kasra\AppData\Local\Temp\.arduinoIDE-unsaved2024615-43736-w4bdpv.tt62a\sketch_jul15b\sketch_jul15b.ino:20:11: error: 'class Adafruit_SSD1351' has no member named 'display'
   display.display();
           ^~~~~~~
C:\Users\Kasra\AppData\Local\Temp\.arduinoIDE-unsaved2024615-43736-w4bdpv.tt62a\sketch_jul15b\sketch_jul15b.ino:22:11: error: 'class Adafruit_SSD1351' has no member named 'clearDisplay'; did you mean 'invertDisplay'?
   display.clearDisplay();
           ^~~~~~~~~~~~
           invertDisplay
C:\Users\Kasra\AppData\Local\Temp\.arduinoIDE-unsaved2024615-43736-w4bdpv.tt62a\sketch_jul15b\sketch_jul15b.ino:24:24: error: 'WHITE' was not declared in this scope
   display.setTextColor(WHITE);
                        ^~~~~
C:\Users\Kasra\AppData\Local\Temp\.arduinoIDE-unsaved2024615-43736-w4bdpv.tt62a\sketch_jul15b\sketch_jul15b.ino:24:24: note: suggested alternative: 'WDIE'
   display.setTextColor(WHITE);
                        ^~~~~
                        WDIE
C:\Users\Kasra\AppData\Local\Temp\.arduinoIDE-unsaved2024615-43736-w4bdpv.tt62a\sketch_jul15b\sketch_jul15b.ino:29:11: error: 'class Adafruit_SSD1351' has no member named 'display'
   display.display();
           ^~~~~~~
C:\Users\Kasra\AppData\Local\Temp\.arduinoIDE-unsaved2024615-43736-w4bdpv.tt62a\sketch_jul15b\sketch_jul15b.ino: In function 'void showReadings(int)':
C:\Users\Kasra\AppData\Local\Temp\.arduinoIDE-unsaved2024615-43736-w4bdpv.tt62a\sketch_jul15b\sketch_jul15b.ino:35:13: error: 'class Adafruit_SSD1351' has no member named 'clearDisplay'; did you mean 'invertDisplay'?
     display.clearDisplay();
             ^~~~~~~~~~~~
             invertDisplay
C:\Users\Kasra\AppData\Local\Temp\.arduinoIDE-unsaved2024615-43736-w4bdpv.tt62a\sketch_jul15b\sketch_jul15b.ino:37:26: error: 'WHITE' was not declared in this scope
     display.setTextColor(WHITE);
                          ^~~~~
C:\Users\Kasra\AppData\Local\Temp\.arduinoIDE-unsaved2024615-43736-w4bdpv.tt62a\sketch_jul15b\sketch_jul15b.ino:37:26: note: suggested alternative: 'WDIE'
     display.setTextColor(WHITE);
                          ^~~~~
                          WDIE
C:\Users\Kasra\AppData\Local\Temp\.arduinoIDE-unsaved2024615-43736-w4bdpv.tt62a\sketch_jul15b\sketch_jul15b.ino:44:13: error: 'class Adafruit_SSD1351' has no member named 'display'
     display.display();
             ^~~~~~~
C:\Users\Kasra\AppData\Local\Temp\.arduinoIDE-unsaved2024615-43736-w4bdpv.tt62a\sketch_jul15b\sketch_jul15b.ino: In function 'void loop()':
C:\Users\Kasra\AppData\Local\Temp\.arduinoIDE-unsaved2024615-43736-w4bdpv.tt62a\sketch_jul15b\sketch_jul15b.ino:64:45: error: 'WHITE' was not declared in this scope
     display.drawRoundRect(0, 5, 126, 30, 2, WHITE);
                                             ^~~~~
C:\Users\Kasra\AppData\Local\Temp\.arduinoIDE-unsaved2024615-43736-w4bdpv.tt62a\sketch_jul15b\sketch_jul15b.ino:64:45: note: suggested alternative: 'WDIE'
     display.drawRoundRect(0, 5, 126, 30, 2, WHITE);
                                             ^~~~~
                                             WDIE
C:\Users\Kasra\AppData\Local\Temp\.arduinoIDE-unsaved2024615-43736-w4bdpv.tt62a\sketch_jul15b\sketch_jul15b.ino:65:38: error: 'BLACK' was not declared in this scope
     display.fillRect(5, 10, 120, 23, BLACK);
                                      ^~~~~
C:\Users\Kasra\AppData\Local\Temp\.arduinoIDE-unsaved2024615-43736-w4bdpv.tt62a\sketch_jul15b\sketch_jul15b.ino:67:13: error: 'class Adafruit_SSD1351' has no member named 'display'
     display.display();
             ^~~~~~~

Using library SPI at version 1.0 in folder: C:\Users\Kasra\AppData\Local\Arduino15\packages\arduino\hardware\avr\1.8.6\libraries\SPI 
Using library Wire at version 1.0 in folder: C:\Users\Kasra\AppData\Local\Arduino15\packages\arduino\hardware\avr\1.8.6\libraries\Wire 
Using library Adafruit GFX Library at version 1.11.9 in folder: C:\Users\Kasra\Documents\Arduino\libraries\Adafruit_GFX_Library 
Using library Adafruit BusIO at version 1.16.1 in folder: C:\Users\Kasra\Documents\Arduino\libraries\Adafruit_BusIO 
Using library Adafruit SSD1351 library at version 1.3.2 in folder: C:\Users\Kasra\Documents\Arduino\libraries\Adafruit_SSD1351_library 
exit status 1

Compilation error: no matching function for call to 'Adafruit_SSD1351::Adafruit_SSD1351(int)'

Here's my code:

#include <SPI.h>
#include <Wire.h>
#include <Adafruit_GFX.h>
#include <Adafruit_SSD1351.h>
#define OLED_RESET 4
#define SCREEN_ADDRESS 0x3C
Adafruit_SSD1351 display(OLED_RESET);

#define PIN_ANTENNA A0
#define CHECK_DELAY 1000
#define lmillis() ((long)millis())

void setup()
{
  Serial.begin(9600);
    pinMode(PIN_ANTENNA, INPUT);
    
    display.begin(SSD1351_SWITCHCAPVCC, SCREEN_ADDRESS);
     display.clearDisplay();
  display.display();
  delay(2000);
  display.clearDisplay();
  display.setTextSize(2);
  display.setTextColor(WHITE);
  display.setCursor(22,10);
  display.println("mircemk");// Print text
  display.setCursor(10,40);
  display.println("EMF METER");
  display.display();
  delay(2000);
}

void showReadings(int emfValue)
{
    display.clearDisplay();   
    display.setTextSize(3);
    display.setTextColor(WHITE);
    display.setCursor(5,40);
    display.println("EMF");

    display.setCursor(70,40);
    display.println(emfValue);

    display.display();
}

void loop()
{

   static int avgValue = 0, emfValue = 0;
    static long nextCheck = 0, emfSum = 0, iterations = 0;

    emfValue = constrain(analogRead(PIN_ANTENNA), 0, 1023);
    emfSum += emfValue;
    iterations++;

    if (lmillis() - nextCheck >= 0) {
        avgValue = emfSum / iterations;
        emfSum = 0;
        iterations = 0;
        showReadings(avgValue);
        nextCheck = lmillis() + CHECK_DELAY;
    }
    display.drawRoundRect(0, 5, 126, 30, 2, WHITE);
    display.fillRect(5, 10, 120, 23, BLACK);
    display.fillRect(5, 10, map(emfValue, 0, 1023, 0, 118), 20, WHITE);
    display.display();

if (emfValue > 80 && emfValue <150) {
  tone (12,100,500);
  }
if (emfValue > 151 && emfValue <250) {
  tone (12,500,500);
}
if (emfValue > 251 ) {
  tone (12,1000,500);
}
}

more about the code here.

I am using the SSD1351 OLED display instead of SH1106, so I made some changes, but getting same errors either way.

Thanks in advance.

Hi, @pkasra
Welcome to the forum

What model Arduino controller are you using?

Have you loaded the Adafruit libraries correctly?
What IDE are you using?

Thanks.. Tom... :smiley: :+1: :coffee: :australia:

The below is from the Adafruit SSD1351 library class definition. Notice there is no constructor that takes a single integer. The parameters in your call need to matchone of the expected formats.

class Adafruit_SSD1351 : public Adafruit_SPITFT {
public:
  // NEW CONSTRUCTORS -- recommended for new projects
  // 6-7 args using soft SPI (reset optional)
  Adafruit_SSD1351(uint16_t width, uint16_t height, int8_t cs_pin,
                   int8_t dc_pin, int8_t mosi_pin, int8_t sclk_pin,
                   int8_t rst_pin = -1);
  // 5-6 args using hardware SPI (must specify peripheral) (reset optional)
  Adafruit_SSD1351(uint16_t width, uint16_t height, SPIClass *spi,
                   int8_t cs_pin, int8_t dc_pin, int8_t rst_pin = -1);

  // DEPRECATED CONSTRUCTORS for back compatibility, avoid in new projects
  // 4-5 args using soft SPI (reset optional)
  Adafruit_SSD1351(int8_t cs_pin, int8_t dc_pin, int8_t mosi_pin,
                   int8_t sclk_pin, int8_t rst_pin = -1);
  // 2-3 args using default hardware SPI peripheral (reset optional)
  Adafruit_SSD1351(int8_t cs_pin, int8_t dc_pin, int8_t rst_pin = -1);

  ~Adafruit_SSD1351(void);

If pin 4 is the default reset pin, then you could just try omitting OLED_RESET from the brackets.

Hi, Thank you!

I'm using Arduino Mega. IDE 2.3.2 .
Looks like I have all the libraries I need included.

Did as suggested. Now I'm getting different errors:


FQBN: arduino:avr:mega
Using board 'mega' from platform in folder: C:\Users\Kasra\AppData\Local\Arduino15\packages\arduino\hardware\avr\1.8.6
Using core 'arduino' from platform in folder: C:\Users\Kasra\AppData\Local\Arduino15\packages\arduino\hardware\avr\1.8.6

Detecting libraries used...
C:\Users\Kasra\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 -flto -w -x c++ -E -CC -mmcu=atmega2560 -DF_CPU=16000000L -DARDUINO=10607 -DARDUINO_AVR_MEGA2560 -DARDUINO_ARCH_AVR -IC:\Users\Kasra\AppData\Local\Arduino15\packages\arduino\hardware\avr\1.8.6\cores\arduino -IC:\Users\Kasra\AppData\Local\Arduino15\packages\arduino\hardware\avr\1.8.6\variants\mega C:\Users\Kasra\AppData\Local\Temp\arduino\sketches\02081E43558EEA0BD6148D99478695C9\sketch\sketch_jul15b.ino.cpp -o nul
Alternatives for SPI.h: [SPI@1.0]
ResolveLibrary(SPI.h)
  -> candidates: [SPI@1.0]
C:\Users\Kasra\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 -flto -w -x c++ -E -CC -mmcu=atmega2560 -DF_CPU=16000000L -DARDUINO=10607 -DARDUINO_AVR_MEGA2560 -DARDUINO_ARCH_AVR -IC:\Users\Kasra\AppData\Local\Arduino15\packages\arduino\hardware\avr\1.8.6\cores\arduino -IC:\Users\Kasra\AppData\Local\Arduino15\packages\arduino\hardware\avr\1.8.6\variants\mega -IC:\Users\Kasra\AppData\Local\Arduino15\packages\arduino\hardware\avr\1.8.6\libraries\SPI\src C:\Users\Kasra\AppData\Local\Temp\arduino\sketches\02081E43558EEA0BD6148D99478695C9\sketch\sketch_jul15b.ino.cpp -o nul
Alternatives for Wire.h: [Wire@1.0]
ResolveLibrary(Wire.h)
  -> candidates: [Wire@1.0]
C:\Users\Kasra\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 -flto -w -x c++ -E -CC -mmcu=atmega2560 -DF_CPU=16000000L -DARDUINO=10607 -DARDUINO_AVR_MEGA2560 -DARDUINO_ARCH_AVR -IC:\Users\Kasra\AppData\Local\Arduino15\packages\arduino\hardware\avr\1.8.6\cores\arduino -IC:\Users\Kasra\AppData\Local\Arduino15\packages\arduino\hardware\avr\1.8.6\variants\mega -IC:\Users\Kasra\AppData\Local\Arduino15\packages\arduino\hardware\avr\1.8.6\libraries\SPI\src -IC:\Users\Kasra\AppData\Local\Arduino15\packages\arduino\hardware\avr\1.8.6\libraries\Wire\src C:\Users\Kasra\AppData\Local\Temp\arduino\sketches\02081E43558EEA0BD6148D99478695C9\sketch\sketch_jul15b.ino.cpp -o nul
Alternatives for Adafruit_GFX.h: [Adafruit GFX Library@1.11.9]
ResolveLibrary(Adafruit_GFX.h)
  -> candidates: [Adafruit GFX Library@1.11.9]
C:\Users\Kasra\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 -flto -w -x c++ -E -CC -mmcu=atmega2560 -DF_CPU=16000000L -DARDUINO=10607 -DARDUINO_AVR_MEGA2560 -DARDUINO_ARCH_AVR -IC:\Users\Kasra\AppData\Local\Arduino15\packages\arduino\hardware\avr\1.8.6\cores\arduino -IC:\Users\Kasra\AppData\Local\Arduino15\packages\arduino\hardware\avr\1.8.6\variants\mega -IC:\Users\Kasra\AppData\Local\Arduino15\packages\arduino\hardware\avr\1.8.6\libraries\SPI\src -IC:\Users\Kasra\AppData\Local\Arduino15\packages\arduino\hardware\avr\1.8.6\libraries\Wire\src -IC:\Users\Kasra\Documents\Arduino\libraries\Adafruit_GFX_Library C:\Users\Kasra\AppData\Local\Temp\arduino\sketches\02081E43558EEA0BD6148D99478695C9\sketch\sketch_jul15b.ino.cpp -o nul
Alternatives for Adafruit_I2CDevice.h: [Adafruit BusIO@1.16.1]
ResolveLibrary(Adafruit_I2CDevice.h)
  -> candidates: [Adafruit BusIO@1.16.1]
C:\Users\Kasra\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 -flto -w -x c++ -E -CC -mmcu=atmega2560 -DF_CPU=16000000L -DARDUINO=10607 -DARDUINO_AVR_MEGA2560 -DARDUINO_ARCH_AVR -IC:\Users\Kasra\AppData\Local\Arduino15\packages\arduino\hardware\avr\1.8.6\cores\arduino -IC:\Users\Kasra\AppData\Local\Arduino15\packages\arduino\hardware\avr\1.8.6\variants\mega -IC:\Users\Kasra\AppData\Local\Arduino15\packages\arduino\hardware\avr\1.8.6\libraries\SPI\src -IC:\Users\Kasra\AppData\Local\Arduino15\packages\arduino\hardware\avr\1.8.6\libraries\Wire\src -IC:\Users\Kasra\Documents\Arduino\libraries\Adafruit_GFX_Library -IC:\Users\Kasra\Documents\Arduino\libraries\Adafruit_BusIO C:\Users\Kasra\AppData\Local\Temp\arduino\sketches\02081E43558EEA0BD6148D99478695C9\sketch\sketch_jul15b.ino.cpp -o nul
Alternatives for Adafruit_SSD1351.h: [Adafruit SSD1351 library@1.3.2]
ResolveLibrary(Adafruit_SSD1351.h)
  -> candidates: [Adafruit SSD1351 library@1.3.2]
C:\Users\Kasra\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 -flto -w -x c++ -E -CC -mmcu=atmega2560 -DF_CPU=16000000L -DARDUINO=10607 -DARDUINO_AVR_MEGA2560 -DARDUINO_ARCH_AVR -IC:\Users\Kasra\AppData\Local\Arduino15\packages\arduino\hardware\avr\1.8.6\cores\arduino -IC:\Users\Kasra\AppData\Local\Arduino15\packages\arduino\hardware\avr\1.8.6\variants\mega -IC:\Users\Kasra\AppData\Local\Arduino15\packages\arduino\hardware\avr\1.8.6\libraries\SPI\src -IC:\Users\Kasra\AppData\Local\Arduino15\packages\arduino\hardware\avr\1.8.6\libraries\Wire\src -IC:\Users\Kasra\Documents\Arduino\libraries\Adafruit_GFX_Library -IC:\Users\Kasra\Documents\Arduino\libraries\Adafruit_BusIO -IC:\Users\Kasra\Documents\Arduino\libraries\Adafruit_SSD1351_library C:\Users\Kasra\AppData\Local\Temp\arduino\sketches\02081E43558EEA0BD6148D99478695C9\sketch\sketch_jul15b.ino.cpp -o nul
C:\Users\Kasra\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 -flto -w -x c++ -E -CC -mmcu=atmega2560 -DF_CPU=16000000L -DARDUINO=10607 -DARDUINO_AVR_MEGA2560 -DARDUINO_ARCH_AVR -IC:\Users\Kasra\AppData\Local\Arduino15\packages\arduino\hardware\avr\1.8.6\cores\arduino -IC:\Users\Kasra\AppData\Local\Arduino15\packages\arduino\hardware\avr\1.8.6\variants\mega -IC:\Users\Kasra\AppData\Local\Arduino15\packages\arduino\hardware\avr\1.8.6\libraries\SPI\src -IC:\Users\Kasra\AppData\Local\Arduino15\packages\arduino\hardware\avr\1.8.6\libraries\Wire\src -IC:\Users\Kasra\Documents\Arduino\libraries\Adafruit_GFX_Library -IC:\Users\Kasra\Documents\Arduino\libraries\Adafruit_BusIO -IC:\Users\Kasra\Documents\Arduino\libraries\Adafruit_SSD1351_library C:\Users\Kasra\AppData\Local\Arduino15\packages\arduino\hardware\avr\1.8.6\libraries\SPI\src\SPI.cpp -o nul
C:\Users\Kasra\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 -flto -w -x c++ -E -CC -mmcu=atmega2560 -DF_CPU=16000000L -DARDUINO=10607 -DARDUINO_AVR_MEGA2560 -DARDUINO_ARCH_AVR -IC:\Users\Kasra\AppData\Local\Arduino15\packages\arduino\hardware\avr\1.8.6\cores\arduino -IC:\Users\Kasra\AppData\Local\Arduino15\packages\arduino\hardware\avr\1.8.6\variants\mega -IC:\Users\Kasra\AppData\Local\Arduino15\packages\arduino\hardware\avr\1.8.6\libraries\SPI\src -IC:\Users\Kasra\AppData\Local\Arduino15\packages\arduino\hardware\avr\1.8.6\libraries\Wire\src -IC:\Users\Kasra\Documents\Arduino\libraries\Adafruit_GFX_Library -IC:\Users\Kasra\Documents\Arduino\libraries\Adafruit_BusIO -IC:\Users\Kasra\Documents\Arduino\libraries\Adafruit_SSD1351_library C:\Users\Kasra\AppData\Local\Arduino15\packages\arduino\hardware\avr\1.8.6\libraries\Wire\src\Wire.cpp -o nul
C:\Users\Kasra\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 -flto -w -x c++ -E -CC -mmcu=atmega2560 -DF_CPU=16000000L -DARDUINO=10607 -DARDUINO_AVR_MEGA2560 -DARDUINO_ARCH_AVR -IC:\Users\Kasra\AppData\Local\Arduino15\packages\arduino\hardware\avr\1.8.6\cores\arduino -IC:\Users\Kasra\AppData\Local\Arduino15\packages\arduino\hardware\avr\1.8.6\variants\mega -IC:\Users\Kasra\AppData\Local\Arduino15\packages\arduino\hardware\avr\1.8.6\libraries\SPI\src -IC:\Users\Kasra\AppData\Local\Arduino15\packages\arduino\hardware\avr\1.8.6\libraries\Wire\src -IC:\Users\Kasra\Documents\Arduino\libraries\Adafruit_GFX_Library -IC:\Users\Kasra\Documents\Arduino\libraries\Adafruit_BusIO -IC:\Users\Kasra\Documents\Arduino\libraries\Adafruit_SSD1351_library C:\Users\Kasra\AppData\Local\Arduino15\packages\arduino\hardware\avr\1.8.6\libraries\Wire\src\utility\twi.c -o nul
C:\Users\Kasra\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 -flto -w -x c++ -E -CC -mmcu=atmega2560 -DF_CPU=16000000L -DARDUINO=10607 -DARDUINO_AVR_MEGA2560 -DARDUINO_ARCH_AVR -IC:\Users\Kasra\AppData\Local\Arduino15\packages\arduino\hardware\avr\1.8.6\cores\arduino -IC:\Users\Kasra\AppData\Local\Arduino15\packages\arduino\hardware\avr\1.8.6\variants\mega -IC:\Users\Kasra\AppData\Local\Arduino15\packages\arduino\hardware\avr\1.8.6\libraries\SPI\src -IC:\Users\Kasra\AppData\Local\Arduino15\packages\arduino\hardware\avr\1.8.6\libraries\Wire\src -IC:\Users\Kasra\Documents\Arduino\libraries\Adafruit_GFX_Library -IC:\Users\Kasra\Documents\Arduino\libraries\Adafruit_BusIO -IC:\Users\Kasra\Documents\Arduino\libraries\Adafruit_SSD1351_library C:\Users\Kasra\Documents\Arduino\libraries\Adafruit_GFX_Library\Adafruit_GFX.cpp -o nul
C:\Users\Kasra\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 -flto -w -x c++ -E -CC -mmcu=atmega2560 -DF_CPU=16000000L -DARDUINO=10607 -DARDUINO_AVR_MEGA2560 -DARDUINO_ARCH_AVR -IC:\Users\Kasra\AppData\Local\Arduino15\packages\arduino\hardware\avr\1.8.6\cores\arduino -IC:\Users\Kasra\AppData\Local\Arduino15\packages\arduino\hardware\avr\1.8.6\variants\mega -IC:\Users\Kasra\AppData\Local\Arduino15\packages\arduino\hardware\avr\1.8.6\libraries\SPI\src -IC:\Users\Kasra\AppData\Local\Arduino15\packages\arduino\hardware\avr\1.8.6\libraries\Wire\src -IC:\Users\Kasra\Documents\Arduino\libraries\Adafruit_GFX_Library -IC:\Users\Kasra\Documents\Arduino\libraries\Adafruit_BusIO -IC:\Users\Kasra\Documents\Arduino\libraries\Adafruit_SSD1351_library C:\Users\Kasra\Documents\Arduino\libraries\Adafruit_GFX_Library\Adafruit_GrayOLED.cpp -o nul
C:\Users\Kasra\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 -flto -w -x c++ -E -CC -mmcu=atmega2560 -DF_CPU=16000000L -DARDUINO=10607 -DARDUINO_AVR_MEGA2560 -DARDUINO_ARCH_AVR -IC:\Users\Kasra\AppData\Local\Arduino15\packages\arduino\hardware\avr\1.8.6\cores\arduino -IC:\Users\Kasra\AppData\Local\Arduino15\packages\arduino\hardware\avr\1.8.6\variants\mega -IC:\Users\Kasra\AppData\Local\Arduino15\packages\arduino\hardware\avr\1.8.6\libraries\SPI\src -IC:\Users\Kasra\AppData\Local\Arduino15\packages\arduino\hardware\avr\1.8.6\libraries\Wire\src -IC:\Users\Kasra\Documents\Arduino\libraries\Adafruit_GFX_Library -IC:\Users\Kasra\Documents\Arduino\libraries\Adafruit_BusIO -IC:\Users\Kasra\Documents\Arduino\libraries\Adafruit_SSD1351_library C:\Users\Kasra\Documents\Arduino\libraries\Adafruit_GFX_Library\Adafruit_SPITFT.cpp -o nul
C:\Users\Kasra\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 -flto -w -x c++ -E -CC -mmcu=atmega2560 -DF_CPU=16000000L -DARDUINO=10607 -DARDUINO_AVR_MEGA2560 -DARDUINO_ARCH_AVR -IC:\Users\Kasra\AppData\Local\Arduino15\packages\arduino\hardware\avr\1.8.6\cores\arduino -IC:\Users\Kasra\AppData\Local\Arduino15\packages\arduino\hardware\avr\1.8.6\variants\mega -IC:\Users\Kasra\AppData\Local\Arduino15\packages\arduino\hardware\avr\1.8.6\libraries\SPI\src -IC:\Users\Kasra\AppData\Local\Arduino15\packages\arduino\hardware\avr\1.8.6\libraries\Wire\src -IC:\Users\Kasra\Documents\Arduino\libraries\Adafruit_GFX_Library -IC:\Users\Kasra\Documents\Arduino\libraries\Adafruit_BusIO -IC:\Users\Kasra\Documents\Arduino\libraries\Adafruit_SSD1351_library C:\Users\Kasra\Documents\Arduino\libraries\Adafruit_GFX_Library\glcdfont.c -o nul
C:\Users\Kasra\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 -flto -w -x c++ -E -CC -mmcu=atmega2560 -DF_CPU=16000000L -DARDUINO=10607 -DARDUINO_AVR_MEGA2560 -DARDUINO_ARCH_AVR -IC:\Users\Kasra\AppData\Local\Arduino15\packages\arduino\hardware\avr\1.8.6\cores\arduino -IC:\Users\Kasra\AppData\Local\Arduino15\packages\arduino\hardware\avr\1.8.6\variants\mega -IC:\Users\Kasra\AppData\Local\Arduino15\packages\arduino\hardware\avr\1.8.6\libraries\SPI\src -IC:\Users\Kasra\AppData\Local\Arduino15\packages\arduino\hardware\avr\1.8.6\libraries\Wire\src -IC:\Users\Kasra\Documents\Arduino\libraries\Adafruit_GFX_Library -IC:\Users\Kasra\Documents\Arduino\libraries\Adafruit_BusIO -IC:\Users\Kasra\Documents\Arduino\libraries\Adafruit_SSD1351_library C:\Users\Kasra\Documents\Arduino\libraries\Adafruit_BusIO\Adafruit_BusIO_Register.cpp -o nul
C:\Users\Kasra\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 -flto -w -x c++ -E -CC -mmcu=atmega2560 -DF_CPU=16000000L -DARDUINO=10607 -DARDUINO_AVR_MEGA2560 -DARDUINO_ARCH_AVR -IC:\Users\Kasra\AppData\Local\Arduino15\packages\arduino\hardware\avr\1.8.6\cores\arduino -IC:\Users\Kasra\AppData\Local\Arduino15\packages\arduino\hardware\avr\1.8.6\variants\mega -IC:\Users\Kasra\AppData\Local\Arduino15\packages\arduino\hardware\avr\1.8.6\libraries\SPI\src -IC:\Users\Kasra\AppData\Local\Arduino15\packages\arduino\hardware\avr\1.8.6\libraries\Wire\src -IC:\Users\Kasra\Documents\Arduino\libraries\Adafruit_GFX_Library -IC:\Users\Kasra\Documents\Arduino\libraries\Adafruit_BusIO -IC:\Users\Kasra\Documents\Arduino\libraries\Adafruit_SSD1351_library C:\Users\Kasra\Documents\Arduino\libraries\Adafruit_BusIO\Adafruit_I2CDevice.cpp -o nul
C:\Users\Kasra\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 -flto -w -x c++ -E -CC -mmcu=atmega2560 -DF_CPU=16000000L -DARDUINO=10607 -DARDUINO_AVR_MEGA2560 -DARDUINO_ARCH_AVR -IC:\Users\Kasra\AppData\Local\Arduino15\packages\arduino\hardware\avr\1.8.6\cores\arduino -IC:\Users\Kasra\AppData\Local\Arduino15\packages\arduino\hardware\avr\1.8.6\variants\mega -IC:\Users\Kasra\AppData\Local\Arduino15\packages\arduino\hardware\avr\1.8.6\libraries\SPI\src -IC:\Users\Kasra\AppData\Local\Arduino15\packages\arduino\hardware\avr\1.8.6\libraries\Wire\src -IC:\Users\Kasra\Documents\Arduino\libraries\Adafruit_GFX_Library -IC:\Users\Kasra\Documents\Arduino\libraries\Adafruit_BusIO -IC:\Users\Kasra\Documents\Arduino\libraries\Adafruit_SSD1351_library C:\Users\Kasra\Documents\Arduino\libraries\Adafruit_BusIO\Adafruit_SPIDevice.cpp -o nul
C:\Users\Kasra\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 -flto -w -x c++ -E -CC -mmcu=atmega2560 -DF_CPU=16000000L -DARDUINO=10607 -DARDUINO_AVR_MEGA2560 -DARDUINO_ARCH_AVR -IC:\Users\Kasra\AppData\Local\Arduino15\packages\arduino\hardware\avr\1.8.6\cores\arduino -IC:\Users\Kasra\AppData\Local\Arduino15\packages\arduino\hardware\avr\1.8.6\variants\mega -IC:\Users\Kasra\AppData\Local\Arduino15\packages\arduino\hardware\avr\1.8.6\libraries\SPI\src -IC:\Users\Kasra\AppData\Local\Arduino15\packages\arduino\hardware\avr\1.8.6\libraries\Wire\src -IC:\Users\Kasra\Documents\Arduino\libraries\Adafruit_GFX_Library -IC:\Users\Kasra\Documents\Arduino\libraries\Adafruit_BusIO -IC:\Users\Kasra\Documents\Arduino\libraries\Adafruit_SSD1351_library C:\Users\Kasra\Documents\Arduino\libraries\Adafruit_SSD1351_library\Adafruit_SSD1351.cpp -o nul
Generating function prototypes...
C:\Users\Kasra\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 -flto -w -x c++ -E -CC -mmcu=atmega2560 -DF_CPU=16000000L -DARDUINO=10607 -DARDUINO_AVR_MEGA2560 -DARDUINO_ARCH_AVR -IC:\Users\Kasra\AppData\Local\Arduino15\packages\arduino\hardware\avr\1.8.6\cores\arduino -IC:\Users\Kasra\AppData\Local\Arduino15\packages\arduino\hardware\avr\1.8.6\variants\mega -IC:\Users\Kasra\AppData\Local\Arduino15\packages\arduino\hardware\avr\1.8.6\libraries\SPI\src -IC:\Users\Kasra\AppData\Local\Arduino15\packages\arduino\hardware\avr\1.8.6\libraries\Wire\src -IC:\Users\Kasra\Documents\Arduino\libraries\Adafruit_GFX_Library -IC:\Users\Kasra\Documents\Arduino\libraries\Adafruit_BusIO -IC:\Users\Kasra\Documents\Arduino\libraries\Adafruit_SSD1351_library C:\Users\Kasra\AppData\Local\Temp\arduino\sketches\02081E43558EEA0BD6148D99478695C9\sketch\sketch_jul15b.ino.cpp -o C:\Users\Kasra\AppData\Local\Temp\778697678\sketch_merged.cpp
C:\Users\Kasra\AppData\Local\Arduino15\packages\builtin\tools\ctags\5.8-arduino11/ctags -u --language-force=c++ -f - --c++-kinds=svpf --fields=KSTtzns --line-directives C:\Users\Kasra\AppData\Local\Temp\778697678\sketch_merged.cpp
Compiling sketch...
"C:\\Users\\Kasra\\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\\Kasra\\AppData\\Local\\Arduino15\\packages\\arduino\\hardware\\avr\\1.8.6\\cores\\arduino" "-IC:\\Users\\Kasra\\AppData\\Local\\Arduino15\\packages\\arduino\\hardware\\avr\\1.8.6\\variants\\mega" "-IC:\\Users\\Kasra\\AppData\\Local\\Arduino15\\packages\\arduino\\hardware\\avr\\1.8.6\\libraries\\SPI\\src" "-IC:\\Users\\Kasra\\AppData\\Local\\Arduino15\\packages\\arduino\\hardware\\avr\\1.8.6\\libraries\\Wire\\src" "-IC:\\Users\\Kasra\\Documents\\Arduino\\libraries\\Adafruit_GFX_Library" "-IC:\\Users\\Kasra\\Documents\\Arduino\\libraries\\Adafruit_BusIO" "-IC:\\Users\\Kasra\\Documents\\Arduino\\libraries\\Adafruit_SSD1351_library" "C:\\Users\\Kasra\\AppData\\Local\\Temp\\arduino\\sketches\\02081E43558EEA0BD6148D99478695C9\\sketch\\sketch_jul15b.ino.cpp" -o "C:\\Users\\Kasra\\AppData\\Local\\Temp\\arduino\\sketches\\02081E43558EEA0BD6148D99478695C9\\sketch\\sketch_jul15b.ino.cpp.o"
C:\Users\Kasra\Documents\sketch_jul15b\sketch_jul15b.ino: In function 'void setup()':
C:\Users\Kasra\Documents\sketch_jul15b\sketch_jul15b.ino:18:13: error: request for member 'begin' in 'display', which is of non-class type 'Adafruit_SSD1351()'
     display.begin(SSD1351_SWITCHCAPVCC, SCREEN_ADDRESS);
             ^~~~~
C:\Users\Kasra\Documents\sketch_jul15b\sketch_jul15b.ino:18:19: error: 'SSD1351_SWITCHCAPVCC' was not declared in this scope
     display.begin(SSD1351_SWITCHCAPVCC, SCREEN_ADDRESS);
                   ^~~~~~~~~~~~~~~~~~~~
C:\Users\Kasra\Documents\sketch_jul15b\sketch_jul15b.ino:18:19: note: suggested alternative: 'SSD1351WIDTH'
     display.begin(SSD1351_SWITCHCAPVCC, SCREEN_ADDRESS);
                   ^~~~~~~~~~~~~~~~~~~~
                   SSD1351WIDTH
C:\Users\Kasra\Documents\sketch_jul15b\sketch_jul15b.ino:19:14: error: request for member 'clearDisplay' in 'display', which is of non-class type 'Adafruit_SSD1351()'
      display.clearDisplay();
              ^~~~~~~~~~~~
C:\Users\Kasra\Documents\sketch_jul15b\sketch_jul15b.ino:20:11: error: request for member 'display' in 'display', which is of non-class type 'Adafruit_SSD1351()'
   display.display();
           ^~~~~~~
C:\Users\Kasra\Documents\sketch_jul15b\sketch_jul15b.ino:22:11: error: request for member 'clearDisplay' in 'display', which is of non-class type 'Adafruit_SSD1351()'
   display.clearDisplay();
           ^~~~~~~~~~~~
C:\Users\Kasra\Documents\sketch_jul15b\sketch_jul15b.ino:23:11: error: request for member 'setTextSize' in 'display', which is of non-class type 'Adafruit_SSD1351()'
   display.setTextSize(2);
           ^~~~~~~~~~~
C:\Users\Kasra\Documents\sketch_jul15b\sketch_jul15b.ino:24:11: error: request for member 'setTextColor' in 'display', which is of non-class type 'Adafruit_SSD1351()'
   display.setTextColor(WHITE);
           ^~~~~~~~~~~~
C:\Users\Kasra\Documents\sketch_jul15b\sketch_jul15b.ino:24:24: error: 'WHITE' was not declared in this scope
   display.setTextColor(WHITE);
                        ^~~~~
C:\Users\Kasra\Documents\sketch_jul15b\sketch_jul15b.ino:24:24: note: suggested alternative: 'WDIE'
   display.setTextColor(WHITE);
                        ^~~~~
                        WDIE
C:\Users\Kasra\Documents\sketch_jul15b\sketch_jul15b.ino:25:11: error: request for member 'setCursor' in 'display', which is of non-class type 'Adafruit_SSD1351()'
   display.setCursor(22,10);
           ^~~~~~~~~
C:\Users\Kasra\Documents\sketch_jul15b\sketch_jul15b.ino:26:11: error: request for member 'println' in 'display', which is of non-class type 'Adafruit_SSD1351()'
   display.println("mircemk");// Print text
           ^~~~~~~
C:\Users\Kasra\Documents\sketch_jul15b\sketch_jul15b.ino:27:11: error: request for member 'setCursor' in 'display', which is of non-class type 'Adafruit_SSD1351()'
   display.setCursor(10,40);
           ^~~~~~~~~
C:\Users\Kasra\Documents\sketch_jul15b\sketch_jul15b.ino:28:11: error: request for member 'println' in 'display', which is of non-class type 'Adafruit_SSD1351()'
   display.println("EMF METER");
           ^~~~~~~
C:\Users\Kasra\Documents\sketch_jul15b\sketch_jul15b.ino:29:11: error: request for member 'display' in 'display', which is of non-class type 'Adafruit_SSD1351()'
   display.display();
           ^~~~~~~
C:\Users\Kasra\Documents\sketch_jul15b\sketch_jul15b.ino: In function 'void showReadings(int)':
C:\Users\Kasra\Documents\sketch_jul15b\sketch_jul15b.ino:35:13: error: request for member 'clearDisplay' in 'display', which is of non-class type 'Adafruit_SSD1351()'
     display.clearDisplay();
             ^~~~~~~~~~~~
C:\Users\Kasra\Documents\sketch_jul15b\sketch_jul15b.ino:36:13: error: request for member 'setTextSize' in 'display', which is of non-class type 'Adafruit_SSD1351()'
     display.setTextSize(3);
             ^~~~~~~~~~~
C:\Users\Kasra\Documents\sketch_jul15b\sketch_jul15b.ino:37:13: error: request for member 'setTextColor' in 'display', which is of non-class type 'Adafruit_SSD1351()'
     display.setTextColor(WHITE);
             ^~~~~~~~~~~~
C:\Users\Kasra\Documents\sketch_jul15b\sketch_jul15b.ino:37:26: error: 'WHITE' was not declared in this scope
     display.setTextColor(WHITE);
                          ^~~~~
C:\Users\Kasra\Documents\sketch_jul15b\sketch_jul15b.ino:37:26: note: suggested alternative: 'WDIE'
     display.setTextColor(WHITE);
                          ^~~~~
                          WDIE
C:\Users\Kasra\Documents\sketch_jul15b\sketch_jul15b.ino:38:13: error: request for member 'setCursor' in 'display', which is of non-class type 'Adafruit_SSD1351()'
     display.setCursor(5,40);
             ^~~~~~~~~
C:\Users\Kasra\Documents\sketch_jul15b\sketch_jul15b.ino:39:13: error: request for member 'println' in 'display', which is of non-class type 'Adafruit_SSD1351()'
     display.println("EMF");
             ^~~~~~~
C:\Users\Kasra\Documents\sketch_jul15b\sketch_jul15b.ino:41:13: error: request for member 'setCursor' in 'display', which is of non-class type 'Adafruit_SSD1351()'
     display.setCursor(70,40);
             ^~~~~~~~~
C:\Users\Kasra\Documents\sketch_jul15b\sketch_jul15b.ino:42:13: error: request for member 'println' in 'display', which is of non-class type 'Adafruit_SSD1351()'
     display.println(emfValue);
             ^~~~~~~
C:\Users\Kasra\Documents\sketch_jul15b\sketch_jul15b.ino:44:13: error: request for member 'display' in 'display', which is of non-class type 'Adafruit_SSD1351()'
     display.display();
             ^~~~~~~
C:\Users\Kasra\Documents\sketch_jul15b\sketch_jul15b.ino: In function 'void loop()':
C:\Users\Kasra\Documents\sketch_jul15b\sketch_jul15b.ino:64:13: error: request for member 'drawRoundRect' in 'display', which is of non-class type 'Adafruit_SSD1351()'
     display.drawRoundRect(0, 5, 126, 30, 2, WHITE);
             ^~~~~~~~~~~~~
C:\Users\Kasra\Documents\sketch_jul15b\sketch_jul15b.ino:64:45: error: 'WHITE' was not declared in this scope
     display.drawRoundRect(0, 5, 126, 30, 2, WHITE);
                                             ^~~~~
C:\Users\Kasra\Documents\sketch_jul15b\sketch_jul15b.ino:64:45: note: suggested alternative: 'WDIE'
     display.drawRoundRect(0, 5, 126, 30, 2, WHITE);
                                             ^~~~~
                                             WDIE
C:\Users\Kasra\Documents\sketch_jul15b\sketch_jul15b.ino:65:13: error: request for member 'fillRect' in 'display', which is of non-class type 'Adafruit_SSD1351()'
     display.fillRect(5, 10, 120, 23, BLACK);
             ^~~~~~~~
C:\Users\Kasra\Documents\sketch_jul15b\sketch_jul15b.ino:65:38: error: 'BLACK' was not declared in this scope
     display.fillRect(5, 10, 120, 23, BLACK);
                                      ^~~~~
C:\Users\Kasra\Documents\sketch_jul15b\sketch_jul15b.ino:66:13: error: request for member 'fillRect' in 'display', which is of non-class type 'Adafruit_SSD1351()'
     display.fillRect(5, 10, map(emfValue, 0, 1023, 0, 118), 20, WHITE);
             ^~~~~~~~
C:\Users\Kasra\Documents\sketch_jul15b\sketch_jul15b.ino:67:13: error: request for member 'display' in 'display', which is of non-class type 'Adafruit_SSD1351()'
     display.display();
             ^~~~~~~

Using library SPI at version 1.0 in folder: C:\Users\Kasra\AppData\Local\Arduino15\packages\arduino\hardware\avr\1.8.6\libraries\SPI 
Using library Wire at version 1.0 in folder: C:\Users\Kasra\AppData\Local\Arduino15\packages\arduino\hardware\avr\1.8.6\libraries\Wire 
Using library Adafruit GFX Library at version 1.11.9 in folder: C:\Users\Kasra\Documents\Arduino\libraries\Adafruit_GFX_Library 
Using library Adafruit BusIO at version 1.16.1 in folder: C:\Users\Kasra\Documents\Arduino\libraries\Adafruit_BusIO 
Using library Adafruit SSD1351 library at version 1.3.2 in folder: C:\Users\Kasra\Documents\Arduino\libraries\Adafruit_SSD1351_library 
exit status 1

Compilation error: request for member 'begin' in 'display', which is of non-class type 'Adafruit_SSD1351()'

Code:

#include <SPI.h>
#include <Wire.h>
#include <Adafruit_GFX.h>
#include <Adafruit_SSD1351.h>
#define OLED_RESET 4
#define SCREEN_ADDRESS 0x3C
Adafruit_SSD1351 display();

#define PIN_ANTENNA A0
#define CHECK_DELAY 1000
#define lmillis() ((long)millis())

void setup()
{
  Serial.begin(9600);
    pinMode(PIN_ANTENNA, INPUT);
    
    display.begin(SSD1351_SWITCHCAPVCC, SCREEN_ADDRESS);
     display.clearDisplay();
  display.display();
  delay(2000);
  display.clearDisplay();
  display.setTextSize(2);
  display.setTextColor(WHITE);
  display.setCursor(22,10);
  display.println("mircemk");// Print text
  display.setCursor(10,40);
  display.println("EMF METER");
  display.display();
  delay(2000);
}

void showReadings(int emfValue)
{
    display.clearDisplay();   
    display.setTextSize(3);
    display.setTextColor(WHITE);
    display.setCursor(5,40);
    display.println("EMF");

    display.setCursor(70,40);
    display.println(emfValue);

    display.display();
}

void loop()
{

   static int avgValue = 0, emfValue = 0;
    static long nextCheck = 0, emfSum = 0, iterations = 0;

    emfValue = constrain(analogRead(PIN_ANTENNA), 0, 1023);
    emfSum += emfValue;
    iterations++;

    if (lmillis() - nextCheck >= 0) {
        avgValue = emfSum / iterations;
        emfSum = 0;
        iterations = 0;
        showReadings(avgValue);
        nextCheck = lmillis() + CHECK_DELAY;
    }
    display.drawRoundRect(0, 5, 126, 30, 2, WHITE);
    display.fillRect(5, 10, 120, 23, BLACK);
    display.fillRect(5, 10, map(emfValue, 0, 1023, 0, 118), 20, WHITE);
    display.display();

if (emfValue > 80 && emfValue <150) {
  tone (12,100,500);
  }
if (emfValue > 151 && emfValue <250) {
  tone (12,500,500);
}
if (emfValue > 251 ) {
  tone (12,1000,500);
}
}

Turned out SSD1351's libraries are not quite similar to the other common OLED displays and the module operates a bit differently. I was able to get it to work after studying a few demo examples from waveshare.com.