Home Forums Sparkfun MP3 Shield Library Support Forum compile error: variable ‘bitrate_table’ must be const Reply To: compile error: variable ‘bitrate_table’ must be const

#2137
Anonymous
Inactive

Hi Michael,

Thanks for your fast anwer and help, it solved the problem I had, but I got new compilation (linking) erros. I put the compilation messages and errors under this message.

avr-gcc is version 4.7.0 so you where right about the problem

Do you have any idea how to solve the new errors?

Thanks,

Mikel

*************************************************

avr-g++ -c -g -Os -Wall -fno-exceptions -ffunction-sections -fdata-sections -mmcu=atmega328p -DF_CPU=16000000L -MMD -DUSB_VID=null -DUSB_PID=null -DARDUINO=101 -I/usr/share/arduino/hardware/arduino/cores/arduino -I/usr/share/arduino/hardware/arduino/variants/standard -I/usr/share/arduino/libraries/SPI -I/home/michiel/sketchbook/libraries/SdFat -I/home/michiel/sketchbook/libraries/SFEMP3Shield /tmp/build921403600284632430.tmp/sketch_feb15a.cpp -o /tmp/build921403600284632430.tmp/sketch_feb15a.cpp.o
Using previously compiled: /tmp/build921403600284632430.tmp/SPI/SPI.cpp.o
Using previously compiled: /tmp/build921403600284632430.tmp/SdFat/SdFat.cpp.o
Using previously compiled: /tmp/build921403600284632430.tmp/SdFat/istream.cpp.o
Using previously compiled: /tmp/build921403600284632430.tmp/SdFat/MinimumSerial.cpp.o
Using previously compiled: /tmp/build921403600284632430.tmp/SdFat/SdFatUtil.cpp.o
Using previously compiled: /tmp/build921403600284632430.tmp/SdFat/SdFile.cpp.o
Using previously compiled: /tmp/build921403600284632430.tmp/SdFat/SdVolume.cpp.o
Using previously compiled: /tmp/build921403600284632430.tmp/SdFat/ostream.cpp.o
Using previously compiled: /tmp/build921403600284632430.tmp/SdFat/Sd2Card.cpp.o
Using previously compiled: /tmp/build921403600284632430.tmp/SdFat/SdStream.cpp.o
Using previously compiled: /tmp/build921403600284632430.tmp/SdFat/SdBaseFile.cpp.o
avr-g++ -c -g -Os -Wall -fno-exceptions -ffunction-sections -fdata-sections -mmcu=atmega328p -DF_CPU=16000000L -MMD -DUSB_VID=null -DUSB_PID=null -DARDUINO=101 -I/usr/share/arduino/hardware/arduino/cores/arduino -I/usr/share/arduino/hardware/arduino/variants/standard -I/usr/share/arduino/libraries/SPI -I/home/michiel/sketchbook/libraries/SdFat -I/home/michiel/sketchbook/libraries/SFEMP3Shield -I/home/michiel/sketchbook/libraries/SFEMP3Shield/utility /home/michiel/sketchbook/libraries/SFEMP3Shield/SFEMP3Shield.cpp -o /tmp/build921403600284632430.tmp/SFEMP3Shield/SFEMP3Shield.cpp.o
/home/michiel/sketchbook/libraries/SFEMP3Shield/SFEMP3Shield.cpp: In member function ‘uint8_t SFEMP3Shield::vs_init()’:
/home/michiel/sketchbook/libraries/SFEMP3Shield/SFEMP3Shield.cpp:236:34: warning: deprecated conversion from string constant to ‘char*’ [-Wwrite-strings]
/home/michiel/sketchbook/libraries/SFEMP3Shield/SFEMP3Shield.cpp: In member function ‘uint8_t SFEMP3Shield::playTrack(uint8_t)’:
/home/michiel/sketchbook/libraries/SFEMP3Shield/SFEMP3Shield.cpp:775:11: warning: unused variable ‘trackNumber’ [-Wunused-variable]
Using previously compiled: /tmp/build921403600284632430.tmp/WInterrupts.c.o
Using previously compiled: /tmp/build921403600284632430.tmp/wiring_digital.c.o
Using previously compiled: /tmp/build921403600284632430.tmp/wiring_analog.c.o
Using previously compiled: /tmp/build921403600284632430.tmp/wiring.c.o
Using previously compiled: /tmp/build921403600284632430.tmp/wiring_shift.c.o
Using previously compiled: /tmp/build921403600284632430.tmp/wiring_pulse.c.o
Using previously compiled: /tmp/build921403600284632430.tmp/Stream.cpp.o
Using previously compiled: /tmp/build921403600284632430.tmp/HardwareSerial.cpp.o
Using previously compiled: /tmp/build921403600284632430.tmp/new.cpp.o
Using previously compiled: /tmp/build921403600284632430.tmp/CDC.cpp.o
Using previously compiled: /tmp/build921403600284632430.tmp/USBCore.cpp.o
Using previously compiled: /tmp/build921403600284632430.tmp/main.cpp.o
Using previously compiled: /tmp/build921403600284632430.tmp/WMath.cpp.o
Using previously compiled: /tmp/build921403600284632430.tmp/HID.cpp.o
Using previously compiled: /tmp/build921403600284632430.tmp/Print.cpp.o
Using previously compiled: /tmp/build921403600284632430.tmp/Tone.cpp.o
Using previously compiled: /tmp/build921403600284632430.tmp/WString.cpp.o
Using previously compiled: /tmp/build921403600284632430.tmp/IPAddress.cpp.o
avr-ar rcs /tmp/build921403600284632430.tmp/core.a /tmp/build921403600284632430.tmp/WInterrupts.c.o
avr-ar rcs /tmp/build921403600284632430.tmp/core.a /tmp/build921403600284632430.tmp/wiring_digital.c.o
avr-ar rcs /tmp/build921403600284632430.tmp/core.a /tmp/build921403600284632430.tmp/wiring_analog.c.o
avr-ar rcs /tmp/build921403600284632430.tmp/core.a /tmp/build921403600284632430.tmp/wiring.c.o
avr-ar rcs /tmp/build921403600284632430.tmp/core.a /tmp/build921403600284632430.tmp/wiring_shift.c.o
avr-ar rcs /tmp/build921403600284632430.tmp/core.a /tmp/build921403600284632430.tmp/wiring_pulse.c.o
avr-ar rcs /tmp/build921403600284632430.tmp/core.a /tmp/build921403600284632430.tmp/Stream.cpp.o
avr-ar rcs /tmp/build921403600284632430.tmp/core.a /tmp/build921403600284632430.tmp/HardwareSerial.cpp.o
avr-ar rcs /tmp/build921403600284632430.tmp/core.a /tmp/build921403600284632430.tmp/new.cpp.o
avr-ar rcs /tmp/build921403600284632430.tmp/core.a /tmp/build921403600284632430.tmp/CDC.cpp.o
avr-ar rcs /tmp/build921403600284632430.tmp/core.a /tmp/build921403600284632430.tmp/USBCore.cpp.o
avr-ar rcs /tmp/build921403600284632430.tmp/core.a /tmp/build921403600284632430.tmp/main.cpp.o
avr-ar rcs /tmp/build921403600284632430.tmp/core.a /tmp/build921403600284632430.tmp/WMath.cpp.o
avr-ar rcs /tmp/build921403600284632430.tmp/core.a /tmp/build921403600284632430.tmp/HID.cpp.o
avr-ar rcs /tmp/build921403600284632430.tmp/core.a /tmp/build921403600284632430.tmp/Print.cpp.o
avr-ar rcs /tmp/build921403600284632430.tmp/core.a /tmp/build921403600284632430.tmp/Tone.cpp.o
avr-ar rcs /tmp/build921403600284632430.tmp/core.a /tmp/build921403600284632430.tmp/WString.cpp.o
avr-ar rcs /tmp/build921403600284632430.tmp/core.a /tmp/build921403600284632430.tmp/IPAddress.cpp.o
avr-gcc -Os -Wl,–gc-sections -mmcu=atmega328p -o /tmp/build921403600284632430.tmp/sketch_feb15a.cpp.elf /tmp/build921403600284632430.tmp/sketch_feb15a.cpp.o /tmp/build921403600284632430.tmp/SPI/SPI.cpp.o /tmp/build921403600284632430.tmp/SdFat/SdFat.cpp.o /tmp/build921403600284632430.tmp/SdFat/istream.cpp.o /tmp/build921403600284632430.tmp/SdFat/MinimumSerial.cpp.o /tmp/build921403600284632430.tmp/SdFat/SdFatUtil.cpp.o /tmp/build921403600284632430.tmp/SdFat/SdFile.cpp.o /tmp/build921403600284632430.tmp/SdFat/SdVolume.cpp.o /tmp/build921403600284632430.tmp/SdFat/ostream.cpp.o /tmp/build921403600284632430.tmp/SdFat/Sd2Card.cpp.o /tmp/build921403600284632430.tmp/SdFat/SdStream.cpp.o /tmp/build921403600284632430.tmp/SdFat/SdBaseFile.cpp.o /tmp/build921403600284632430.tmp/SFEMP3Shield/SFEMP3Shield.cpp.o /tmp/build921403600284632430.tmp/core.a -L/tmp/build921403600284632430.tmp -lm
SFEMP3Shield/SFEMP3Shield.cpp.o: In function `_GLOBAL__sub_I__ZN12SFEMP3Shield5trackE’:
/usr/share/arduino/hardware/arduino/cores/arduino/Print.h:43: undefined reference to `sd’
collect2: error: ld returned 1 exit status