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


I have been poking around with avr-gcc 4.7.0 and find they enforce more and require fixes in the arduino libraries. as per http://andybrown.me.uk/wk/2012/04/28/avr-gcc-4-7-0-and-avr-libc-1-8-0-compiled-for-windows/ . Initially I get an error similar to the above collect2 on sd. , but not the same.

I am not a Linux person, but I am suspicious that your avr-gcc that you are using is not the avr-gcc within/provided by the Arduino Library.  It took a lot of effort to discover the subtle tweaks required to get 4.7.0 working fully with this and SdFat’s Library. So you could go forward; by updating the libraries, as per the above link. Or go back to the normally used avr-gcc by Arduino (4.3.0).

Going Forward I found that SdFatUtil.h requires a minor update as to all the FreeRam to work. It is simplest to comment out the Serial.print(FreeRam(), DEC); in the setup(). Until I make an issue with SdFatLib.