FTOLED compile error

128x128 pixel 1.5" full colour OLED display with MicroSD card slot. [Product page]
Post Reply
Lawrence
Posts: 4
Joined: Wed Dec 02, 2015 7:03 am

FTOLED compile error

Post by Lawrence » Wed Dec 02, 2015 8:03 am

G'day

I installed the FTOLED library on Arduino IDE 1.6.6 but every example I try just gives me a compile error:

\Arduino\libraries\FTOLED/FTOLED.h:182:25: error: 'File' has not been declared

BMP_Status displayBMP(File &source, const int from_x, const int from_y, const int to_x, const int to_y);

Any clues as to what I've buggered up?

andrew
Freetronics Staff
Freetronics Staff
Posts: 978
Joined: Sun Jul 14, 2013 7:06 am
Location: Melbourne, Australia
Contact:

Re: FTOLED compile error

Post by andrew » Thu Dec 03, 2015 6:59 am

Could you please copy the error messages from the IDE and paste them into a reply?

Lawrence
Posts: 4
Joined: Wed Dec 02, 2015 7:03 am

Re: FTOLED compile error

Post by Lawrence » Fri Dec 04, 2015 3:47 am

Arduino: 1.6.6 (Windows 7), Board: "Arduino Nano, ATmega328"

C:\Program Files\Arduino\arduino-builder -dump-prefs -logger=machine -hardware "C:\Program Files\Arduino\hardware" -tools "C:\Program Files\Arduino\tools-builder" -tools "C:\Program Files\Arduino\hardware\tools\avr" -built-in-libraries "C:\Program Files\Arduino\libraries" -libraries "C:\Users\Ashby\Documents\Arduino\libraries" -fqbn=arduino:avr:nano:cpu=atmega328 -ide-version=10606 -build-path "C:\Users\Ashby\AppData\Local\Temp\build856ab897043bb6887ed9b68227ac3b56.tmp" -warnings=none -prefs=build.warn_data_percentage=75 -verbose "C:\Users\Ashby\Documents\Arduino\libraries\FTOLED\examples\fonts_demo\fonts_demo.ino"
C:\Program Files\Arduino\arduino-builder -compile -logger=machine -hardware "C:\Program Files\Arduino\hardware" -tools "C:\Program Files\Arduino\tools-builder" -tools "C:\Program Files\Arduino\hardware\tools\avr" -built-in-libraries "C:\Program Files\Arduino\libraries" -libraries "C:\Users\Ashby\Documents\Arduino\libraries" -fqbn=arduino:avr:nano:cpu=atmega328 -ide-version=10606 -build-path "C:\Users\Ashby\AppData\Local\Temp\build856ab897043bb6887ed9b68227ac3b56.tmp" -warnings=none -prefs=build.warn_data_percentage=75 -verbose "C:\Users\Ashby\Documents\Arduino\libraries\FTOLED\examples\fonts_demo\fonts_demo.ino"
"C:\Program Files\Arduino\hardware\tools\avr/bin/avr-g++" -c -g -Os -w -std=gnu++11 -fno-exceptions -ffunction-sections -fdata-sections -fno-threadsafe-statics -w -x c++ -M -MG -MP -mmcu=atmega328p -DF_CPU=16000000L -DARDUINO=10606 -DARDUINO_AVR_NANO -DARDUINO_ARCH_AVR "-IC:\Program Files\Arduino\hardware\arduino\avr\cores\arduino" "-IC:\Program Files\Arduino\hardware\arduino\avr\variants\eightanaloginputs" "C:\Users\Ashby\AppData\Local\Temp\build856ab897043bb6887ed9b68227ac3b56.tmp\sketch\fonts_demo.ino.cpp"
"C:\Program Files\Arduino\hardware\tools\avr/bin/avr-g++" -c -g -Os -w -std=gnu++11 -fno-exceptions -ffunction-sections -fdata-sections -fno-threadsafe-statics -w -x c++ -M -MG -MP -mmcu=atmega328p -DF_CPU=16000000L -DARDUINO=10606 -DARDUINO_AVR_NANO -DARDUINO_ARCH_AVR "-IC:\Program Files\Arduino\hardware\arduino\avr\cores\arduino" "-IC:\Program Files\Arduino\hardware\arduino\avr\variants\eightanaloginputs" "-IC:\Users\Ashby\Documents\Arduino\libraries\FTOLED" "-IC:\Program Files\Arduino\hardware\arduino\avr\libraries\SPI" "-IC:\Program Files\Arduino\libraries\SD\src" "C:\Users\Ashby\AppData\Local\Temp\build856ab897043bb6887ed9b68227ac3b56.tmp\sketch\fonts_demo.ino.cpp"
"C:\Program Files\Arduino\hardware\tools\avr/bin/avr-g++" -c -g -Os -w -std=gnu++11 -fno-exceptions -ffunction-sections -fdata-sections -fno-threadsafe-statics -w -x c++ -M -MG -MP -mmcu=atmega328p -DF_CPU=16000000L -DARDUINO=10606 -DARDUINO_AVR_NANO -DARDUINO_ARCH_AVR "-IC:\Program Files\Arduino\hardware\arduino\avr\cores\arduino" "-IC:\Program Files\Arduino\hardware\arduino\avr\variants\eightanaloginputs" "-IC:\Users\Ashby\Documents\Arduino\libraries\FTOLED" "-IC:\Program Files\Arduino\hardware\arduino\avr\libraries\SPI" "-IC:\Program Files\Arduino\libraries\SD\src" "C:\Users\Ashby\AppData\Local\Temp\build856ab897043bb6887ed9b68227ac3b56.tmp\sketch\fonts_demo.ino.cpp"
"C:\Program Files\Arduino\hardware\tools\avr/bin/avr-g++" -c -g -Os -w -std=gnu++11 -fno-exceptions -ffunction-sections -fdata-sections -fno-threadsafe-statics -w -x c++ -M -MG -MP -mmcu=atmega328p -DF_CPU=16000000L -DARDUINO=10606 -DARDUINO_AVR_NANO -DARDUINO_ARCH_AVR "-IC:\Program Files\Arduino\hardware\arduino\avr\cores\arduino" "-IC:\Program Files\Arduino\hardware\arduino\avr\variants\eightanaloginputs" "-IC:\Users\Ashby\Documents\Arduino\libraries\FTOLED" "-IC:\Program Files\Arduino\hardware\arduino\avr\libraries\SPI" "-IC:\Program Files\Arduino\libraries\SD\src" "C:\Users\Ashby\AppData\Local\Temp\build856ab897043bb6887ed9b68227ac3b56.tmp\sketch\fonts_demo.ino.cpp"
"C:\Program Files\Arduino\hardware\tools\avr/bin/avr-g++" -c -g -Os -w -std=gnu++11 -fno-exceptions -ffunction-sections -fdata-sections -fno-threadsafe-statics -w -x c++ -M -MG -MP -mmcu=atmega328p -DF_CPU=16000000L -DARDUINO=10606 -DARDUINO_AVR_NANO -DARDUINO_ARCH_AVR "-IC:\Program Files\Arduino\hardware\arduino\avr\cores\arduino" "-IC:\Program Files\Arduino\hardware\arduino\avr\variants\eightanaloginputs" "-IC:\Program Files\Arduino\libraries\SD\src" "-IC:\Users\Ashby\Documents\Arduino\libraries\FTOLED" "-IC:\Program Files\Arduino\hardware\arduino\avr\libraries\SPI" "C:\Users\Ashby\Documents\Arduino\libraries\FTOLED\FTOLED.cpp"
"C:\Program Files\Arduino\hardware\tools\avr/bin/avr-g++" -c -g -Os -w -std=gnu++11 -fno-exceptions -ffunction-sections -fdata-sections -fno-threadsafe-statics -w -x c++ -M -MG -MP -mmcu=atmega328p -DF_CPU=16000000L -DARDUINO=10606 -DARDUINO_AVR_NANO -DARDUINO_ARCH_AVR "-IC:\Program Files\Arduino\hardware\arduino\avr\cores\arduino" "-IC:\Program Files\Arduino\hardware\arduino\avr\variants\eightanaloginputs" "-IC:\Users\Ashby\Documents\Arduino\libraries\FTOLED" "-IC:\Program Files\Arduino\hardware\arduino\avr\libraries\SPI" "-IC:\Program Files\Arduino\libraries\SD\src" "C:\Users\Ashby\Documents\Arduino\libraries\FTOLED\FTOLED_BMP.cpp"
"C:\Program Files\Arduino\hardware\tools\avr/bin/avr-g++" -c -g -Os -w -std=gnu++11 -fno-exceptions -ffunction-sections -fdata-sections -fno-threadsafe-statics -w -x c++ -M -MG -MP -mmcu=atmega328p -DF_CPU=16000000L -DARDUINO=10606 -DARDUINO_AVR_NANO -DARDUINO_ARCH_AVR "-IC:\Program Files\Arduino\hardware\arduino\avr\cores\arduino" "-IC:\Program Files\Arduino\hardware\arduino\avr\variants\eightanaloginputs" "-IC:\Users\Ashby\Documents\Arduino\libraries\FTOLED" "-IC:\Program Files\Arduino\hardware\arduino\avr\libraries\SPI" "-IC:\Program Files\Arduino\libraries\SD\src" "C:\Users\Ashby\Documents\Arduino\libraries\FTOLED\FTOLED_Text.cpp"
"C:\Program Files\Arduino\hardware\tools\avr/bin/avr-g++" -c -g -Os -w -std=gnu++11 -fno-exceptions -ffunction-sections -fdata-sections -fno-threadsafe-statics -w -x c++ -M -MG -MP -mmcu=atmega328p -DF_CPU=16000000L -DARDUINO=10606 -DARDUINO_AVR_NANO -DARDUINO_ARCH_AVR "-IC:\Program Files\Arduino\hardware\arduino\avr\cores\arduino" "-IC:\Program Files\Arduino\hardware\arduino\avr\variants\eightanaloginputs" "-IC:\Users\Ashby\Documents\Arduino\libraries\FTOLED" "-IC:\Program Files\Arduino\hardware\arduino\avr\libraries\SPI" "-IC:\Program Files\Arduino\libraries\SD\src" "C:\Users\Ashby\Documents\Arduino\libraries\FTOLED\FTOLED_TextBox.cpp"
"C:\Program Files\Arduino\hardware\tools\avr/bin/avr-g++" -c -g -Os -w -std=gnu++11 -fno-exceptions -ffunction-sections -fdata-sections -fno-threadsafe-statics -w -x c++ -M -MG -MP -mmcu=atmega328p -DF_CPU=16000000L -DARDUINO=10606 -DARDUINO_AVR_NANO -DARDUINO_ARCH_AVR "-IC:\Program Files\Arduino\hardware\arduino\avr\cores\arduino" "-IC:\Program Files\Arduino\hardware\arduino\avr\variants\eightanaloginputs" "-IC:\Users\Ashby\Documents\Arduino\libraries\FTOLED" "-IC:\Program Files\Arduino\hardware\arduino\avr\libraries\SPI" "-IC:\Program Files\Arduino\libraries\SD\src" "C:\Program Files\Arduino\hardware\arduino\avr\libraries\SPI\SPI.cpp"
"C:\Program Files\Arduino\hardware\tools\avr/bin/avr-g++" -c -g -Os -w -std=gnu++11 -fno-exceptions -ffunction-sections -fdata-sections -fno-threadsafe-statics -w -x c++ -M -MG -MP -mmcu=atmega328p -DF_CPU=16000000L -DARDUINO=10606 -DARDUINO_AVR_NANO -DARDUINO_ARCH_AVR "-IC:\Program Files\Arduino\hardware\arduino\avr\cores\arduino" "-IC:\Program Files\Arduino\hardware\arduino\avr\variants\eightanaloginputs" "-IC:\Program Files\Arduino\hardware\arduino\avr\libraries\SPI" "-IC:\Program Files\Arduino\libraries\SD\src" "-IC:\Users\Ashby\Documents\Arduino\libraries\FTOLED" "C:\Program Files\Arduino\libraries\SD\src\File.cpp"
"C:\Program Files\Arduino\hardware\tools\avr/bin/avr-g++" -c -g -Os -w -std=gnu++11 -fno-exceptions -ffunction-sections -fdata-sections -fno-threadsafe-statics -w -x c++ -M -MG -MP -mmcu=atmega328p -DF_CPU=16000000L -DARDUINO=10606 -DARDUINO_AVR_NANO -DARDUINO_ARCH_AVR "-IC:\Program Files\Arduino\hardware\arduino\avr\cores\arduino" "-IC:\Program Files\Arduino\hardware\arduino\avr\variants\eightanaloginputs" "-IC:\Program Files\Arduino\hardware\arduino\avr\libraries\SPI" "-IC:\Program Files\Arduino\libraries\SD\src" "-IC:\Users\Ashby\Documents\Arduino\libraries\FTOLED" "C:\Program Files\Arduino\libraries\SD\src\SD.cpp"
"C:\Program Files\Arduino\hardware\tools\avr/bin/avr-g++" -c -g -Os -w -std=gnu++11 -fno-exceptions -ffunction-sections -fdata-sections -fno-threadsafe-statics -w -x c++ -M -MG -MP -mmcu=atmega328p -DF_CPU=16000000L -DARDUINO=10606 -DARDUINO_AVR_NANO -DARDUINO_ARCH_AVR "-IC:\Program Files\Arduino\hardware\arduino\avr\cores\arduino" "-IC:\Program Files\Arduino\hardware\arduino\avr\variants\eightanaloginputs" "-IC:\Users\Ashby\Documents\Arduino\libraries\FTOLED" "-IC:\Program Files\Arduino\hardware\arduino\avr\libraries\SPI" "-IC:\Program Files\Arduino\libraries\SD\src" "C:\Program Files\Arduino\libraries\SD\src\utility\Sd2Card.cpp"
"C:\Program Files\Arduino\hardware\tools\avr/bin/avr-g++" -c -g -Os -w -std=gnu++11 -fno-exceptions -ffunction-sections -fdata-sections -fno-threadsafe-statics -w -x c++ -M -MG -MP -mmcu=atmega328p -DF_CPU=16000000L -DARDUINO=10606 -DARDUINO_AVR_NANO -DARDUINO_ARCH_AVR "-IC:\Program Files\Arduino\hardware\arduino\avr\cores\arduino" "-IC:\Program Files\Arduino\hardware\arduino\avr\variants\eightanaloginputs" "-IC:\Users\Ashby\Documents\Arduino\libraries\FTOLED" "-IC:\Program Files\Arduino\hardware\arduino\avr\libraries\SPI" "-IC:\Program Files\Arduino\libraries\SD\src" "C:\Program Files\Arduino\libraries\SD\src\utility\SdFile.cpp"
"C:\Program Files\Arduino\hardware\tools\avr/bin/avr-g++" -c -g -Os -w -std=gnu++11 -fno-exceptions -ffunction-sections -fdata-sections -fno-threadsafe-statics -w -x c++ -M -MG -MP -mmcu=atmega328p -DF_CPU=16000000L -DARDUINO=10606 -DARDUINO_AVR_NANO -DARDUINO_ARCH_AVR "-IC:\Program Files\Arduino\hardware\arduino\avr\cores\arduino" "-IC:\Program Files\Arduino\hardware\arduino\avr\variants\eightanaloginputs" "-IC:\Program Files\Arduino\libraries\SD\src" "-IC:\Users\Ashby\Documents\Arduino\libraries\FTOLED" "-IC:\Program Files\Arduino\hardware\arduino\avr\libraries\SPI" "C:\Program Files\Arduino\libraries\SD\src\utility\SdVolume.cpp"
"C:\Program Files\Arduino\hardware\tools\avr/bin/avr-g++" -c -g -Os -w -std=gnu++11 -fno-exceptions -ffunction-sections -fdata-sections -fno-threadsafe-statics -w -x c++ -M -MG -MP -mmcu=atmega328p -DF_CPU=16000000L -DARDUINO=10606 -DARDUINO_AVR_NANO -DARDUINO_ARCH_AVR "-IC:\Program Files\Arduino\hardware\arduino\avr\cores\arduino" "-IC:\Program Files\Arduino\hardware\arduino\avr\variants\eightanaloginputs" "-IC:\Users\Ashby\Documents\Arduino\libraries\FTOLED" "-IC:\Program Files\Arduino\hardware\arduino\avr\libraries\SPI" "-IC:\Program Files\Arduino\libraries\SD\src" "C:\Users\Ashby\AppData\Local\Temp\build856ab897043bb6887ed9b68227ac3b56.tmp\sketch\fonts_demo.ino.cpp"
"C:\Program Files\Arduino\hardware\tools\avr/bin/avr-g++" -c -g -Os -w -std=gnu++11 -fno-exceptions -ffunction-sections -fdata-sections -fno-threadsafe-statics -w -x c++ -E -CC -mmcu=atmega328p -DF_CPU=16000000L -DARDUINO=10606 -DARDUINO_AVR_NANO -DARDUINO_ARCH_AVR "-IC:\Program Files\Arduino\hardware\arduino\avr\cores\arduino" "-IC:\Program Files\Arduino\hardware\arduino\avr\variants\eightanaloginputs" "-IC:\Users\Ashby\Documents\Arduino\libraries\FTOLED" "-IC:\Program Files\Arduino\hardware\arduino\avr\libraries\SPI" "-IC:\Program Files\Arduino\libraries\SD\src" "C:\Users\Ashby\AppData\Local\Temp\build856ab897043bb6887ed9b68227ac3b56.tmp\sketch\fonts_demo.ino.cpp"
"C:\Program Files\Arduino\tools-builder\ctags\5.8-arduino2/ctags" -u --language-force=c++ -f - --c++-kinds=svpf --fields=KSTtzns "C:\Users\Ashby\AppData\Local\Temp\build856ab897043bb6887ed9b68227ac3b56.tmp\preproc\ctags_target.cpp"
"C:\Program Files\Arduino\tools-builder\ctags\5.8-arduino2/ctags" -u --language-force=c++ -f - --c++-kinds=svpf --fields=KSTtzns "C:\Users\Ashby\AppData\Local\Temp\build856ab897043bb6887ed9b68227ac3b56.tmp\preproc\ctags_target.cpp"
"C:\Program Files\Arduino\hardware\tools\avr/bin/avr-g++" -c -g -Os -w -std=gnu++11 -fno-exceptions -ffunction-sections -fdata-sections -fno-threadsafe-statics -MMD -mmcu=atmega328p -DF_CPU=16000000L -DARDUINO=10606 -DARDUINO_AVR_NANO -DARDUINO_ARCH_AVR "-IC:\Program Files\Arduino\hardware\arduino\avr\cores\arduino" "-IC:\Program Files\Arduino\hardware\arduino\avr\variants\eightanaloginputs" "-IC:\Users\Ashby\Documents\Arduino\libraries\FTOLED" "-IC:\Program Files\Arduino\hardware\arduino\avr\libraries\SPI" "-IC:\Program Files\Arduino\libraries\SD\src" "C:\Users\Ashby\AppData\Local\Temp\build856ab897043bb6887ed9b68227ac3b56.tmp\sketch\fonts_demo.ino.cpp" -o "C:\Users\Ashby\AppData\Local\Temp\build856ab897043bb6887ed9b68227ac3b56.tmp\sketch\fonts_demo.ino.cpp.o"
In file included from C:\Users\Ashby\Documents\Arduino\libraries\FTOLED\examples\fonts_demo\fonts_demo.ino:3:0:

C:\Users\Ashby\Documents\Arduino\libraries\FTOLED/FTOLED.h:181:25: error: reference to 'File' is ambiguous

BMP_Status displayBMP(File &source, const int x, const int y);

^

In file included from C:\Users\Ashby\Documents\Arduino\libraries\FTOLED\examples\fonts_demo\fonts_demo.ino:3:0:

C:\Users\Ashby\Documents\Arduino\libraries\FTOLED/FTOLED.h:48:7: note: candidates are: class File

class File; /* Provided by SD library except sometimes on Yun, see comment at top of FTOLED_BMP.cpp */

^

In file included from C:\Users\Ashby\Documents\Arduino\libraries\FTOLED\examples\fonts_demo\fonts_demo.ino:2:0:

C:\Program Files\Arduino\libraries\SD\src/SD.h:28:7: note: class SDLib::File

class File : public Stream {

^

In file included from C:\Users\Ashby\Documents\Arduino\libraries\FTOLED\examples\fonts_demo\fonts_demo.ino:3:0:

C:\Users\Ashby\Documents\Arduino\libraries\FTOLED/FTOLED.h:181:25: error: 'File' has not been declared

BMP_Status displayBMP(File &source, const int x, const int y);

^

C:\Users\Ashby\Documents\Arduino\libraries\FTOLED/FTOLED.h:182:25: error: reference to 'File' is ambiguous

BMP_Status displayBMP(File &source, const int from_x, const int from_y, const int to_x, const int to_y);

^

In file included from C:\Users\Ashby\Documents\Arduino\libraries\FTOLED\examples\fonts_demo\fonts_demo.ino:3:0:

C:\Users\Ashby\Documents\Arduino\libraries\FTOLED/FTOLED.h:48:7: note: candidates are: class File

class File; /* Provided by SD library except sometimes on Yun, see comment at top of FTOLED_BMP.cpp */

^

In file included from C:\Users\Ashby\Documents\Arduino\libraries\FTOLED\examples\fonts_demo\fonts_demo.ino:2:0:

C:\Program Files\Arduino\libraries\SD\src/SD.h:28:7: note: class SDLib::File

class File : public Stream {

^

In file included from C:\Users\Ashby\Documents\Arduino\libraries\FTOLED\examples\fonts_demo\fonts_demo.ino:3:0:

C:\Users\Ashby\Documents\Arduino\libraries\FTOLED/FTOLED.h:182:25: error: 'File' has not been declared

BMP_Status displayBMP(File &source, const int from_x, const int from_y, const int to_x, const int to_y);

^

Using library FTOLED at version 1.1.2 in folder: C:\Users\Ashby\Documents\Arduino\libraries\FTOLED
Using library SPI at version 1.0 in folder: C:\Program Files\Arduino\hardware\arduino\avr\libraries\SPI
Using library SD at version 1.0.6 in folder: C:\Program Files\Arduino\libraries\SD
exit status 1
Error compiling.

Lawrence
Posts: 4
Joined: Wed Dec 02, 2015 7:03 am

Re: FTOLED compile error

Post by Lawrence » Fri Dec 04, 2015 3:51 am

Sorry about the last reply. I didn't realise how much it copied. You should be able to work it out. It's the stuff at the bottom.

andrew
Freetronics Staff
Freetronics Staff
Posts: 978
Joined: Sun Jul 14, 2013 7:06 am
Location: Melbourne, Australia
Contact:

Re: FTOLED compile error

Post by andrew » Tue Dec 08, 2015 10:39 pm

No worries.
Please revert back to Arduino IDE v1.6.5 for the moment.

angusgr
Freetronics Staff
Freetronics Staff
Posts: 853
Joined: Tue Apr 09, 2013 11:19 pm
Location: Melbourne, Australia
Contact:

Re: FTOLED compile error

Post by angusgr » Wed Dec 09, 2015 12:38 am

Hi Lawrence,

Thanks for reporting this error.

It looks like Arduino 1.6.6 changed some of the compilation settings which broke FTOLED. I've just updated the FTOLED library to version 1.1.3 which fixes the issue. You can either get it via Arduino Boards Manager once it updates (might take a day or two), or you can download the new library directly from github.


Angus

Lawrence
Posts: 4
Joined: Wed Dec 02, 2015 7:03 am

Re: FTOLED compile error

Post by Lawrence » Wed Dec 09, 2015 1:05 am

Mate you're a LEGEND! Too easy.
My first ever forum (& I'm old) & you saved hours of heartache.
Let me shout you a beer.

thebaron
Posts: 1
Joined: Fri Apr 29, 2016 8:38 pm

Re: FTOLED compile error

Post by thebaron » Fri Apr 29, 2016 11:39 pm

Problem still there in 1.6.8.I added in a

#include <SH.h>

and commented out line 48

//class File; /* Provided by SD library except sometimes on Yun, see comment at top of FTOLED_BMP.cpp */

as a work around until i just discovered as i began writing this that 1.1.3 is the version in github with the fix. 1.1.2 is still being dished out as the latest by the Arduino library manager. There were a few compile time warnings which i may take a look at if they are still there in 1.1.3 when i try it later.

Post Reply

Who is online

Users browsing this forum: No registered users and 4 guests