Page 1 of 1

FTOLED compile error

Posted: Wed Dec 02, 2015 8:03 am
by Lawrence
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?

Re: FTOLED compile error

Posted: Thu Dec 03, 2015 6:59 am
by andrew
Could you please copy the error messages from the IDE and paste them into a reply?

Re: FTOLED compile error

Posted: Fri Dec 04, 2015 3:47 am
by Lawrence
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.

Re: FTOLED compile error

Posted: Fri Dec 04, 2015 3:51 am
by Lawrence
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.

Re: FTOLED compile error

Posted: Tue Dec 08, 2015 10:39 pm
by andrew
No worries.
Please revert back to Arduino IDE v1.6.5 for the moment.

Re: FTOLED compile error

Posted: Wed Dec 09, 2015 12:38 am
by angusgr
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

Re: FTOLED compile error

Posted: Wed Dec 09, 2015 1:05 am
by Lawrence
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.

Re: FTOLED compile error

Posted: Fri Apr 29, 2016 11:39 pm
by thebaron
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.