brunialti / MENWIZ

ARDUINO LCD menu library: short user code to manage complex menu structures
65 stars 25 forks source link

Error Compiling with new Arduino IDE #9

Open niko-h opened 9 years ago

niko-h commented 9 years ago

Hi,

as I'm not that much into C++ I can only give you a rather vague problem description: My Board is a MEGA 2560. Until recently, I developed using the Arduino IDE 1.0.5 - which works just fine. After updating to ArduinoIDE 1.6 I get the following compile-Errors:

[...]/Documents/Arduino/libraries/MENWIZ/MENWIZ.cpp: In member function 'void menwiz::drawMenu(_menu*)':
[...]/Documents/Arduino/libraries/MENWIZ/MENWIZ.cpp:29:59: error: ISO C++ forbids declaration of 'type name' with no type [-fpermissive]
 #define TSFORM(b,s,l)    memset(b,32,l);strcpy_P(b,(const prog_char*)s); b[strlen(b)]=' ';itoa(cur_menu->cur_item+1,tmp,10);strcat(tmp,"/");itoa(cur_menu->idx_o,tmp+strlen(tmp),10);b[col-strlen(tmp)-1]=126;memcpy(b+(col-strlen(tmp)),tmp,strlen(tmp));b[l]=NULL;lcd->print(b)
                                                           ^
[...]/Documents/Arduino/libraries/MENWIZ/MENWIZ.cpp:376:5: note: in expansion of macro 'TSFORM'
     TSFORM(buf,mc->label,(int) col);
     ^
[...]/Documents/Arduino/libraries/MENWIZ/MENWIZ.cpp:29:59: error: ISO C++ forbids declaration of 'type name' with no type [-fpermissive]
 #define TSFORM(b,s,l)    memset(b,32,l);strcpy_P(b,(const prog_char*)s); b[strlen(b)]=' ';itoa(cur_menu->cur_item+1,tmp,10);strcat(tmp,"/");itoa(cur_menu->idx_o,tmp+strlen(tmp),10);b[col-strlen(tmp)-1]=126;memcpy(b+(col-strlen(tmp)),tmp,strlen(tmp));b[l]=NULL;lcd->print(b)
                                                           ^
[...]/Documents/Arduino/libraries/MENWIZ/MENWIZ.cpp:376:5: note: in expansion of macro 'TSFORM'
     TSFORM(buf,mc->label,(int) col);
     ^
[...]/Documents/Arduino/libraries/MENWIZ/MENWIZ.cpp:29:53: error: expected primary-expression before 'const'
 #define TSFORM(b,s,l)    memset(b,32,l);strcpy_P(b,(const prog_char*)s); b[strlen(b)]=' ';itoa(cur_menu->cur_item+1,tmp,10);strcat(tmp,"/");itoa(cur_menu->idx_o,tmp+strlen(tmp),10);b[col-strlen(tmp)-1]=126;memcpy(b+(col-strlen(tmp)),tmp,strlen(tmp));b[l]=NULL;lcd->print(b)
                                                     ^
[...]/Documents/Arduino/libraries/MENWIZ/MENWIZ.cpp:376:5: note: in expansion of macro 'TSFORM'
     TSFORM(buf,mc->label,(int) col);
     ^
[...]/Documents/Arduino/libraries/MENWIZ/MENWIZ.cpp:29:53: error: expected ')' before 'const'
 #define TSFORM(b,s,l)    memset(b,32,l);strcpy_P(b,(const prog_char*)s); b[strlen(b)]=' ';itoa(cur_menu->cur_item+1,tmp,10);strcat(tmp,"/");itoa(cur_menu->idx_o,tmp+strlen(tmp),10);b[col-strlen(tmp)-1]=126;memcpy(b+(col-strlen(tmp)),tmp,strlen(tmp));b[l]=NULL;lcd->print(b)
                                                     ^
[...]/Documents/Arduino/libraries/MENWIZ/MENWIZ.cpp:376:5: note: in expansion of macro 'TSFORM'
     TSFORM(buf,mc->label,(int) col);
     ^
[...]/Documents/Arduino/libraries/MENWIZ/MENWIZ.cpp:30:59: error: ISO C++ forbids declaration of 'type name' with no type [-fpermissive]
 #define FSFORM(b,s,l)    memset(b,32,l);strcpy_P(b,(const prog_char*)s);b[strlen(b)]=' ';b[l]=NULL;lcd->print(b)
                                                           ^
[...]/Documents/Arduino/libraries/MENWIZ/MENWIZ.cpp:379:5: note: in expansion of macro 'FSFORM'
     FSFORM(buf,mc->label,(int) col);
     ^
[...]/Documents/Arduino/libraries/MENWIZ/MENWIZ.cpp:30:59: error: ISO C++ forbids declaration of 'type name' with no type [-fpermissive]
 #define FSFORM(b,s,l)    memset(b,32,l);strcpy_P(b,(const prog_char*)s);b[strlen(b)]=' ';b[l]=NULL;lcd->print(b)
                                                           ^
[...]/Documents/Arduino/libraries/MENWIZ/MENWIZ.cpp:379:5: note: in expansion of macro 'FSFORM'
     FSFORM(buf,mc->label,(int) col);
     ^
[...]/Documents/Arduino/libraries/MENWIZ/MENWIZ.cpp:30:53: error: expected primary-expression before 'const'
 #define FSFORM(b,s,l)    memset(b,32,l);strcpy_P(b,(const prog_char*)s);b[strlen(b)]=' ';b[l]=NULL;lcd->print(b)
                                                     ^
[...]/Documents/Arduino/libraries/MENWIZ/MENWIZ.cpp:379:5: note: in expansion of macro 'FSFORM'
     FSFORM(buf,mc->label,(int) col);
     ^
[...]/Documents/Arduino/libraries/MENWIZ/MENWIZ.cpp:30:53: error: expected ')' before 'const'
 #define FSFORM(b,s,l)    memset(b,32,l);strcpy_P(b,(const prog_char*)s);b[strlen(b)]=' ';b[l]=NULL;lcd->print(b)
                                                     ^
[...]/Documents/Arduino/libraries/MENWIZ/MENWIZ.cpp:379:5: note: in expansion of macro 'FSFORM'
     FSFORM(buf,mc->label,(int) col);
     ^
[...]/Documents/Arduino/libraries/MENWIZ/MENWIZ.cpp:403:28: error: ISO C++ forbids declaration of 'type name' with no type [-fpermissive]
    strcpy_P(&buf[1],(const prog_char*)mn->label);
                            ^
[...]/Documents/Arduino/libraries/MENWIZ/MENWIZ.cpp:403:28: error: ISO C++ forbids declaration of 'type name' with no type [-fpermissive]
[...]/Documents/Arduino/libraries/MENWIZ/MENWIZ.cpp:403:22: error: expected primary-expression before 'const'
    strcpy_P(&buf[1],(const prog_char*)mn->label);
                      ^
[...]/Documents/Arduino/libraries/MENWIZ/MENWIZ.cpp:403:22: error: expected ')' before 'const'
[...]/Documents/Arduino/libraries/MENWIZ/MENWIZ.cpp:30:59: error: ISO C++ forbids declaration of 'type name' with no type [-fpermissive]
 #define FSFORM(b,s,l)    memset(b,32,l);strcpy_P(b,(const prog_char*)s);b[strlen(b)]=' ';b[l]=NULL;lcd->print(b)
                                                           ^
[...]/Documents/Arduino/libraries/MENWIZ/MENWIZ.cpp:445:6: note: in expansion of macro 'FSFORM'
      FSFORM(buf,m[op->sbm].label,(int) col-1);
      ^
[...]/Documents/Arduino/libraries/MENWIZ/MENWIZ.cpp:30:59: error: ISO C++ forbids declaration of 'type name' with no type [-fpermissive]
 #define FSFORM(b,s,l)    memset(b,32,l);strcpy_P(b,(const prog_char*)s);b[strlen(b)]=' ';b[l]=NULL;lcd->print(b)
                                                           ^
[...]/Documents/Arduino/libraries/MENWIZ/MENWIZ.cpp:445:6: note: in expansion of macro 'FSFORM'
      FSFORM(buf,m[op->sbm].label,(int) col-1);
      ^
[...]/Documents/Arduino/libraries/MENWIZ/MENWIZ.cpp:30:53: error: expected primary-expression before 'const'
 #define FSFORM(b,s,l)    memset(b,32,l);strcpy_P(b,(const prog_char*)s);b[strlen(b)]=' ';b[l]=NULL;lcd->print(b)
                                                     ^
[...]/Documents/Arduino/libraries/MENWIZ/MENWIZ.cpp:445:6: note: in expansion of macro 'FSFORM'
      FSFORM(buf,m[op->sbm].label,(int) col-1);
      ^
[...]/Documents/Arduino/libraries/MENWIZ/MENWIZ.cpp:30:53: error: expected ')' before 'const'
 #define FSFORM(b,s,l)    memset(b,32,l);strcpy_P(b,(const prog_char*)s);b[strlen(b)]=' ';b[l]=NULL;lcd->print(b)
                                                     ^
[...]/Documents/Arduino/libraries/MENWIZ/MENWIZ.cpp:445:6: note: in expansion of macro 'FSFORM'
      FSFORM(buf,m[op->sbm].label,(int) col-1);
      ^
[...]/Documents/Arduino/libraries/MENWIZ/MENWIZ.cpp:30:59: error: ISO C++ forbids declaration of 'type name' with no type [-fpermissive]
 #define FSFORM(b,s,l)    memset(b,32,l);strcpy_P(b,(const prog_char*)s);b[strlen(b)]=' ';b[l]=NULL;lcd->print(b)
                                                           ^
[...]/Documents/Arduino/libraries/MENWIZ/MENWIZ.cpp:452:4: note: in expansion of macro 'FSFORM'
    FSFORM(buf,m[op->sbm].label,(int) col-1);
    ^
[...]/Documents/Arduino/libraries/MENWIZ/MENWIZ.cpp:30:59: error: ISO C++ forbids declaration of 'type name' with no type [-fpermissive]
 #define FSFORM(b,s,l)    memset(b,32,l);strcpy_P(b,(const prog_char*)s);b[strlen(b)]=' ';b[l]=NULL;lcd->print(b)
                                                           ^
[...]/Documents/Arduino/libraries/MENWIZ/MENWIZ.cpp:452:4: note: in expansion of macro 'FSFORM'
    FSFORM(buf,m[op->sbm].label,(int) col-1);
    ^
[...]/Documents/Arduino/libraries/MENWIZ/MENWIZ.cpp:30:53: error: expected primary-expression before 'const'
 #define FSFORM(b,s,l)    memset(b,32,l);strcpy_P(b,(const prog_char*)s);b[strlen(b)]=' ';b[l]=NULL;lcd->print(b)
                                                     ^
[...]/Documents/Arduino/libraries/MENWIZ/MENWIZ.cpp:452:4: note: in expansion of macro 'FSFORM'
    FSFORM(buf,m[op->sbm].label,(int) col-1);
    ^
[...]/Documents/Arduino/libraries/MENWIZ/MENWIZ.cpp:30:53: error: expected ')' before 'const'
 #define FSFORM(b,s,l)    memset(b,32,l);strcpy_P(b,(const prog_char*)s);b[strlen(b)]=' ';b[l]=NULL;lcd->print(b)
                                                     ^
[...]/Documents/Arduino/libraries/MENWIZ/MENWIZ.cpp:452:4: note: in expansion of macro 'FSFORM'
    FSFORM(buf,m[op->sbm].label,(int) col-1);
    ^
[...]/Documents/Arduino/libraries/MENWIZ/MENWIZ.cpp: In member function 'void menwiz::drawVar(_menu*)':
[...]/Documents/Arduino/libraries/MENWIZ/MENWIZ.cpp:30:59: error: ISO C++ forbids declaration of 'type name' with no type [-fpermissive]
 #define FSFORM(b,s,l)    memset(b,32,l);strcpy_P(b,(const prog_char*)s);b[strlen(b)]=' ';b[l]=NULL;lcd->print(b)
                                                           ^
[...]/Documents/Arduino/libraries/MENWIZ/MENWIZ.cpp:496:19: note: in expansion of macro 'FSFORM'
                   FSFORM(buf,op->label,(int) col-1);
                   ^
[...]/Documents/Arduino/libraries/MENWIZ/MENWIZ.cpp:30:59: error: ISO C++ forbids declaration of 'type name' with no type [-fpermissive]
 #define FSFORM(b,s,l)    memset(b,32,l);strcpy_P(b,(const prog_char*)s);b[strlen(b)]=' ';b[l]=NULL;lcd->print(b)
                                                           ^
[...]/Documents/Arduino/libraries/MENWIZ/MENWIZ.cpp:496:19: note: in expansion of macro 'FSFORM'
                   FSFORM(buf,op->label,(int) col-1);
                   ^
[...]/Documents/Arduino/libraries/MENWIZ/MENWIZ.cpp:30:53: error: expected primary-expression before 'const'
 #define FSFORM(b,s,l)    memset(b,32,l);strcpy_P(b,(const prog_char*)s);b[strlen(b)]=' ';b[l]=NULL;lcd->print(b)
                                                     ^
[...]/Documents/Arduino/libraries/MENWIZ/MENWIZ.cpp:496:19: note: in expansion of macro 'FSFORM'
                   FSFORM(buf,op->label,(int) col-1);
                   ^
[...]/Documents/Arduino/libraries/MENWIZ/MENWIZ.cpp:30:53: error: expected ')' before 'const'
 #define FSFORM(b,s,l)    memset(b,32,l);strcpy_P(b,(const prog_char*)s);b[strlen(b)]=' ';b[l]=NULL;lcd->print(b)
                                                     ^
[...]/Documents/Arduino/libraries/MENWIZ/MENWIZ.cpp:496:19: note: in expansion of macro 'FSFORM'
                   FSFORM(buf,op->label,(int) col-1);
                   ^
[...]/Documents/Arduino/libraries/MENWIZ/MENWIZ.cpp: In member function 'void menwiz::drawList(_menu*, int)':
[...]/Documents/Arduino/libraries/MENWIZ/MENWIZ.cpp:30:59: error: ISO C++ forbids declaration of 'type name' with no type [-fpermissive]
 #define FSFORM(b,s,l)    memset(b,32,l);strcpy_P(b,(const prog_char*)s);b[strlen(b)]=' ';b[l]=NULL;lcd->print(b)
                                                           ^
[...]/Documents/Arduino/libraries/MENWIZ/MENWIZ.cpp:567:3: note: in expansion of macro 'FSFORM'
   FSFORM(buf,((_option*)mc->o[i])->label,(int)cw-1);
   ^
[...]/Documents/Arduino/libraries/MENWIZ/MENWIZ.cpp:30:59: error: ISO C++ forbids declaration of 'type name' with no type [-fpermissive]
 #define FSFORM(b,s,l)    memset(b,32,l);strcpy_P(b,(const prog_char*)s);b[strlen(b)]=' ';b[l]=NULL;lcd->print(b)
                                                           ^
[...]/Documents/Arduino/libraries/MENWIZ/MENWIZ.cpp:567:3: note: in expansion of macro 'FSFORM'
   FSFORM(buf,((_option*)mc->o[i])->label,(int)cw-1);
   ^
[...]/Documents/Arduino/libraries/MENWIZ/MENWIZ.cpp:30:53: error: expected primary-expression before 'const'
 #define FSFORM(b,s,l)    memset(b,32,l);strcpy_P(b,(const prog_char*)s);b[strlen(b)]=' ';b[l]=NULL;lcd->print(b)
                                                     ^
[...]/Documents/Arduino/libraries/MENWIZ/MENWIZ.cpp:567:3: note: in expansion of macro 'FSFORM'
   FSFORM(buf,((_option*)mc->o[i])->label,(int)cw-1);
   ^
[...]/Documents/Arduino/libraries/MENWIZ/MENWIZ.cpp:30:53: error: expected ')' before 'const'
 #define FSFORM(b,s,l)    memset(b,32,l);strcpy_P(b,(const prog_char*)s);b[strlen(b)]=' ';b[l]=NULL;lcd->print(b)
                                                     ^
[...]/Documents/Arduino/libraries/MENWIZ/MENWIZ.cpp:567:3: note: in expansion of macro 'FSFORM'
   FSFORM(buf,((_option*)mc->o[i])->label,(int)cw-1);
   ^
Error compiling.
zevero commented 9 years ago

Me too! I have the exact same experience coming from 1.0.6 to 1.6.1

zevero commented 9 years ago

Hey, I found https://github.com/brunialti/MENWIZ_1_3_2 I tried the quick_tour example (from 1.2.0) with 1.3.2 and it compiled fine on 1.6.1 with EEPROM enabled.

So the menu and buttons work. I will test EEPROM tomorrow.

niko-h commented 9 years ago

Thanks, that works.

snelweg commented 9 years ago

Works fine here too,thanks