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

#2143
Anonymous
Inactive

BTW, I now get the following error when I compile MP3Shield_Library_Demo.ino:
SdFat/SdFatUtil.cpp.o: In function `SdFatUtil::SerialPrintln_P(char const*)’:
/home/michiel/sketchbook/libraries/SdFat/SdFatUtil.cpp:73: undefined reference to `SdFatUtil::__brkval’
/home/michiel/sketchbook/libraries/SdFat/SdFatUtil.cpp:73: undefined reference to `SdFatUtil::__brkval’
/home/michiel/sketchbook/libraries/SdFat/SdFatUtil.cpp:73: undefined reference to `SdFatUtil::__malloc_heap_start’
/home/michiel/sketchbook/libraries/SdFat/SdFatUtil.cpp:73: undefined reference to `SdFatUtil::__malloc_heap_start’
collect2: error: ld returned 1 exit status

When I compile the following code:
#include <SPI.h>
#include <SdFat.h>
#include <SdFatUtil.h> 
#include <SFEMP3Shield.h>

SFEMP3Shield MP3player;

void setup() {

  Serial.begin(9600);

  //start the shield
  MP3player.begin();

  //start playing track 1
  MP3player.playTrack(1);
}

//do something else now
void loop() {

  Serial.println(“I’m bored!”);
  delay(2000);

}

On compilation of the above code I get the following error:
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