error compiling

Hi
Help
I'm having trouble uploading firmware on the Arduino Mega 2560
I RAMPS v1.4 motherboard
I have Windows 7
I use version 1.6.5
Errors:

C:\Users\HAMEDH~1\AppData\Local\Temp\build3078220038397651215.tmp\ui.cpp: In member function 'void UIDisplay::adjustMenuPos()':
C:\Users\HAMEDH~1\AppData\Local\Temp\build3078220038397651215.tmp\ui.cpp:2016:47: error: ISO C++ forbids declaration of 'type name' with no type [-fpermissive]
     uint8_t mtype = HAL::readFlashByte((const prog_char*)&(men->menuType));
                                               ^
C:\Users\HAMEDH~1\AppData\Local\Temp\build3078220038397651215.tmp\ui.cpp:2016:47: error: ISO C++ forbids declaration of 'type name' with no type [-fpermissive]
C:\Users\HAMEDH~1\AppData\Local\Temp\build3078220038397651215.tmp\ui.cpp:2016:41: error: expected primary-expression before 'const'
     uint8_t mtype = HAL::readFlashByte((const prog_char*)&(men->menuType));
                                         ^
C:\Users\HAMEDH~1\AppData\Local\Temp\build3078220038397651215.tmp\ui.cpp:2016:41: error: expected ')' before 'const'
C:\Users\HAMEDH~1\AppData\Local\Temp\build3078220038397651215.tmp\ui.cpp: In member function 'void UIDisplay::nextPreviousAction(int8_t)':
C:\Users\HAMEDH~1\AppData\Local\Temp\build3078220038397651215.tmp\ui.cpp:2083:47: error: ISO C++ forbids declaration of 'type name' with no type [-fpermissive]
     uint8_t mtype = HAL::readFlashByte((const prog_char*)&(men->menuType));
                                               ^
C:\Users\HAMEDH~1\AppData\Local\Temp\build3078220038397651215.tmp\ui.cpp:2083:47: error: ISO C++ forbids declaration of 'type name' with no type [-fpermissive]
C:\Users\HAMEDH~1\AppData\Local\Temp\build3078220038397651215.tmp\ui.cpp:2083:41: error: expected primary-expression before 'const'
     uint8_t mtype = HAL::readFlashByte((const prog_char*)&(men->menuType));
                                         ^
C:\Users\HAMEDH~1\AppData\Local\Temp\build3078220038397651215.tmp\ui.cpp:2083:41: error: expected ')' before 'const'
C:\Users\HAMEDH~1\AppData\Local\Temp\build3078220038397651215.tmp\ui.cpp:2087:49: error: ISO C++ forbids declaration of 'type name' with no type [-fpermissive]
     uint8_t entType = HAL::readFlashByte((const prog_char*)&(ent->menuType));// 0 = Info, 1 = Headline, 2 = submenu ref, 3 = direct action command
                                                 ^
C:\Users\HAMEDH~1\AppData\Local\Temp\build3078220038397651215.tmp\ui.cpp:2087:49: error: ISO C++ forbids declaration of 'type name' with no type [-fpermissive]
C:\Users\HAMEDH~1\AppData\Local\Temp\build3078220038397651215.tmp\ui.cpp:2087:43: error: expected primary-expression before 'const'
     uint8_t entType = HAL::readFlashByte((const prog_char*)&(ent->menuType));// 0 = Info, 1 = Headline, 2 = submenu ref, 3 = direct action command
                                           ^
C:\Users\HAMEDH~1\AppData\Local\Temp\build3078220038397651215.tmp\ui.cpp:2087:43: error: expected ')' before 'const'
Error compiling.


Please, help.

Comments

  • You forgot the most important information - firmware version. 0.91 needs 1.0.6 or older to compile. 0.92 works with latest arduino versions.
  • I am trying to get over a problem with Repetier update software on Github for my German Rep Rap V3 Protos ,I upload  the software and when pressing the upload button it downloads and then tells me ,expected primary -expresssion before `const`. Any ideas what I can do to run this program .
  • Depends on the code in that line. Guess your configuration does not match that firmware version and so it misses some defines so that the line with the error does not make sense for compiler causing the error message.
Sign In or Register to comment.