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

#3491

I am not really able to tell you for MAC, or so for Linux, as these systems have AVR-GCC as a separate module that may be upgraded independantlly from the IDE downloaded from Arduino.cc.

Where for window installs the AVR-GCC is included and have seen this library successfully compile for:

  1. arduino-1.0.5
  2. Arduino-1.0.5-ERW
  3. arduino-1.0.5-r2-windows
  4. arduino-1.0.6
  5. arduino-1.5.2-windows
  6. arduino-1.5.5
  7. arduino-1.5.5-r2
  8. arduino-1.5.6-r2
  9. arduino-1.5.7
  10. arduino-1.5.8
  11. arduino-1.6.0
  12. arduino-1.6.3-windows
  13. arduino-nightly.2014_11_03
  14. arduino-nightly.2015_06_30
  15. arduino-nightly.2015_08_29
  16. arduino-nightly.2015_10_30
  17. arduino-nightly.2015_11_02
  18. arduino-nightly.2016_02_02

I also recall that around IDE 1.5.7(ish) the avr-gcc was updated to 4.7 and looks like somewhere in the 1.6.x they upgraded again to 4.8.

to find out the version you are using, enable the verbose for compiling. Then using the log displayed from a compile locate the directory of avr-g++ and run it manually from a command prompt with the –version command.

example:

C:\projects\Arduino>C:\projects\Arduino\arduino-nightly.2015_11_02\hardware\tools\avr\bin\avr-g++.exe –version
avr-g++.exe (GCC) 4.8.1
Copyright (C) 2013 Free Software Foundation, Inc.
This is free software; see the source for copying conditions.  There is NO
warranty; not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.

I also recommend reviewing Andy’s Workshop http://andybrown.me.uk/2015/03/08/avr-gcc-492/, he has several articles providing transition guidance between versions of avr-gcc. search his website for the version you may have or desire.