Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Compile Errors with webclient example on Raspberry / Alamode #24

Open
psegov opened this issue Apr 18, 2013 · 7 comments
Open

Compile Errors with webclient example on Raspberry / Alamode #24

psegov opened this issue Apr 18, 2013 · 7 comments

Comments

@psegov
Copy link

psegov commented Apr 18, 2013

Hello I am getting compile errors when try and run the examples on Raspberry PI / Alamode. I have searched around for a solution, but still have not found a fix that works so I thought I would post here to see if others have run into this issue. I am using RN-XU wifly rev. 3 on a seeedstudio bees shield.

http://baldwisdom.com/category/raspberry-pi/alamode/

The sample I am compiling is (no changes):
/home/pi/WiFlyHQ-master/examples/httpclient

Here are the errors:

In file included from httpclient.cpp:12:0:
/usr/share/arduino/libraries/WiFlyHQ/WiFlyHQ.h:325:27: error: prog_char does not name a type
/usr/share/arduino/libraries/WiFlyHQ/WiFlyHQ.h:325:38: error: ISO C++ forbids declaration of str with no type [-fpermissive]
/usr/share/arduino/libraries/WiFlyHQ/WiFlyHQ.h:326:31: error: prog_char does not name a type
/usr/share/arduino/libraries/WiFlyHQ/WiFlyHQ.h:326:46: error: ISO C++ forbids declaration of str with no type [-fpermissive]
/usr/share/arduino/libraries/WiFlyHQ/WiFlyHQ.h:328:23: error: prog_char does not name a type
/usr/share/arduino/libraries/WiFlyHQ/WiFlyHQ.h:328:34: error: ISO C++ forbids declaration of str with no type [-fpermissive]
/usr/share/arduino/libraries/WiFlyHQ/WiFlyHQ.h:342:26: error: prog_char does not name a type
/usr/share/arduino/libraries/WiFlyHQ/WiFlyHQ.h:342:37: error: ISO C++ forbids declaration of cmd with no type [-fpermissive]
/usr/share/arduino/libraries/WiFlyHQ/WiFlyHQ.h:343:26: error: prog_char does not name a type
/usr/share/arduino/libraries/WiFlyHQ/WiFlyHQ.h:343:37: error: ISO C++ forbids declaration of opt with no type [-fpermissive]
/usr/share/arduino/libraries/WiFlyHQ/WiFlyHQ.h:346:31: error: prog_char does not name a type
/usr/share/arduino/libraries/WiFlyHQ/WiFlyHQ.h:346:42: error: ISO C++ forbids declaration of str with no type [-fpermissive]

Here are the errors I am getting when I compile
/home/pi/downloads/WiFlyHQ-master/examples/httpclient_progmem

In file included from httpclient_progmem.cpp:24:0:
/usr/share/arduino/libraries/WiFlyHQ/WiFlyHQ.h:328:27: error: ‘prog_char’ does not name a type
/usr/share/arduino/libraries/WiFlyHQ/WiFlyHQ.h:328:38: error: ISO C++ forbids declaration of ‘str’ with no type [-fpermissive]
/usr/share/arduino/libraries/WiFlyHQ/WiFlyHQ.h:329:31: error: ‘prog_char’ does not name a type
/usr/share/arduino/libraries/WiFlyHQ/WiFlyHQ.h:329:46: error: ISO C++ forbids declaration of ‘str’ with no type [-fpermissive]
/usr/share/arduino/libraries/WiFlyHQ/WiFlyHQ.h:331:23: error: ‘prog_char’ does not name a type
/usr/share/arduino/libraries/WiFlyHQ/WiFlyHQ.h:331:34: error: ISO C++ forbids declaration of ‘str’ with no type [-fpermissive]
/usr/share/arduino/libraries/WiFlyHQ/WiFlyHQ.h:345:26: error: ‘prog_char’ does not name a type
/usr/share/arduino/libraries/WiFlyHQ/WiFlyHQ.h:345:37: error: ISO C++ forbids declaration of ‘cmd’ with no type [-fpermissive]
/usr/share/arduino/libraries/WiFlyHQ/WiFlyHQ.h:346:26: error: ‘prog_char’ does not name a type
/usr/share/arduino/libraries/WiFlyHQ/WiFlyHQ.h:346:37: error: ISO C++ forbids declaration of ‘opt’ with no type [-fpermissive]
/usr/share/arduino/libraries/WiFlyHQ/WiFlyHQ.h:349:31: error: ‘prog_char’ does not name a type
/usr/share/arduino/libraries/WiFlyHQ/WiFlyHQ.h:349:42: error: ISO C++ forbids declaration of ‘str’ with no type [-fpermissive]
httpclient_progmem.cpp:31:20: error: ‘prog_char’ does not name a type
httpclient_progmem.cpp:31:31: error: ISO C++ forbids declaration of ‘str’ with no type [-fpermissive]
httpclient_progmem.cpp:32:22: error: ‘prog_char’ does not name a type
httpclient_progmem.cpp:32:33: error: ISO C++ forbids declaration of ‘str’ with no type [-fpermissive]
httpclient_progmem.cpp:49:20: error: ‘prog_char’ does not name a type
httpclient_progmem.cpp:49:31: error: ISO C++ forbids declaration of ‘str’ with no type [-fpermissive]
httpclient_progmem.cpp:50:22: error: ‘prog_char’ does not name a type
httpclient_progmem.cpp:50:33: error: ISO C++ forbids declaration of ‘str’ with no type [-fpermissive]
httpclient_progmem.cpp: In function ‘void setup()’:
httpclient_progmem.cpp:57:15: error: ‘prog_char’ does not name a type
httpclient_progmem.cpp:57:15: error: ‘__c’ was not declared in this scope
httpclient_progmem.cpp:58:13: error: ‘prog_char’ does not name a type
httpclient_progmem.cpp:58:13: error: ‘__c’ was not declared in this scope
httpclient_progmem.cpp:63:19: error: ‘prog_char’ does not name a type
httpclient_progmem.cpp:63:19: error: ‘__c’ was not declared in this scope
httpclient_progmem.cpp:70:12: error: ‘prog_char’ does not name a type
httpclient_progmem.cpp:70:12: error: ‘__c’ was not declared in this scope
httpclient_progmem.cpp:76:16: error: ‘prog_char’ does not name a type
httpclient_progmem.cpp:76:16: error: ‘__c’ was not declared in this scope
httpclient_progmem.cpp:78:16: error: ‘prog_char’ does not name a type
httpclient_progmem.cpp:78:16: error: ‘__c’ was not declared in this scope
httpclient_progmem.cpp:82:19: error: ‘prog_char’ does not name a type
httpclient_progmem.cpp:82:19: error: ‘__c’ was not declared in this scope
httpclient_progmem.cpp:87:13: error: ‘prog_char’ does not name a type
httpclient_progmem.cpp:87:13: error: ‘__c’ was not declared in this scope
httpclient_progmem.cpp:89:13: error: ‘prog_char’ does not name a type
httpclient_progmem.cpp:89:13: error: ‘__c’ was not declared in this scope
httpclient_progmem.cpp:91:13: error: ‘prog_char’ does not name a type
httpclient_progmem.cpp:91:13: error: ‘__c’ was not declared in this scope
httpclient_progmem.cpp:93:13: error: ‘prog_char’ does not name a type
httpclient_progmem.cpp:93:13: error: ‘__c’ was not declared in this scope
httpclient_progmem.cpp:95:13: error: ‘prog_char’ does not name a type
httpclient_progmem.cpp:95:13: error: ‘__c’ was not declared in this scope
httpclient_progmem.cpp:99:13: error: ‘prog_char’ does not name a type
httpclient_progmem.cpp:99:13: error: ‘__c’ was not declared in this scope
httpclient_progmem.cpp:103:19: error: ‘prog_char’ does not name a type
httpclient_progmem.cpp:103:19: error: ‘__c’ was not declared in this scope
httpclient_progmem.cpp:108:17: error: ‘prog_char’ does not name a type
httpclient_progmem.cpp:108:17: error: ‘__c’ was not declared in this scope
httpclient_progmem.cpp:115:19: error: ‘prog_char’ does not name a type
httpclient_progmem.cpp:115:19: error: ‘__c’ was not declared in this scope
httpclient_progmem.cpp: At global scope:
httpclient_progmem.cpp:151:20: error: ‘prog_char’ does not name a type
httpclient_progmem.cpp:151:31: error: ISO C++ forbids declaration of ‘str’ with no type [-fpermissive]
httpclient_progmem.cpp:159:22: error: ‘prog_char’ does not name a type
httpclient_progmem.cpp:159:33: error: ISO C++ forbids declaration of ‘str’ with no type [-fpermissive]

Any help would be greatly appreciated.

@psegov
Copy link
Author

psegov commented Apr 22, 2013

I found the solution to this issue, prog_char has been depreciated in newer versions of avr-lib. I have updated the example and library I would like to contribute this back to the community.

@dlefur
Copy link

dlefur commented Apr 27, 2013

Hello,
how did you fix it ? Is there a new version of this WiflyHQ files ?

Thanks.

@harlequin-tech
Copy link
Owner

Looks like it will need a re-write to use the __flash keyword for variables accessing progmem, which would be compatible with 4.7 avr compiler. That would break compatibility with the older compiler, so it needs a solution to support both.

@t-liebscher
Copy link

@dlefur - to fix it replace all occurrences of the "prog_char" with "char PROGMEM" in the library and example files. I also commented out the two lines:
#undef PROGMEM
#define PROGMEM attribute(( section(".progmem.data") ))

and all works perfect

@franksanborn-hhs
Copy link

Hello,

I have updated the wiFlyHQ library on the alamode / raspberry pi setup. I wanted to let you know that there are still compiler errors.

In file included from wfly_test.cpp:12:0:
/usr/share/arduino/libraries/WiFlyHQ/WiFlyHQ.h:333:27: error: prog_char does not name a type
/usr/share/arduino/libraries/WiFlyHQ/WiFlyHQ.h:333:38: error: ISO C++ forbids declaration of str with no type [-fpermissive]
/usr/share/arduino/libraries/WiFlyHQ/WiFlyHQ.h:334:31: error: prog_char does not name a type
/usr/share/arduino/libraries/WiFlyHQ/WiFlyHQ.h:334:46: error: ISO C++ forbids declaration of str with no type [-fpermissive]
/usr/share/arduino/libraries/WiFlyHQ/WiFlyHQ.h:336:23: error: prog_char does not name a type
/usr/share/arduino/libraries/WiFlyHQ/WiFlyHQ.h:336:34: error: ISO C++ forbids declaration of str with no type [-fpermissive]
/usr/share/arduino/libraries/WiFlyHQ/WiFlyHQ.h:350:26: error: prog_char does not name a type
/usr/share/arduino/libraries/WiFlyHQ/WiFlyHQ.h:350:37: error: ISO C++ forbids declaration of cmd with no type [-fpermissive]
/usr/share/arduino/libraries/WiFlyHQ/WiFlyHQ.h:351:26: error: prog_char does not name a type
/usr/share/arduino/libraries/WiFlyHQ/WiFlyHQ.h:351:37: error: ISO C++ forbids declaration of opt with no type [-fpermissive]
/usr/share/arduino/libraries/WiFlyHQ/WiFlyHQ.h:354:31: error: prog_char does not name a type
/usr/share/arduino/libraries/WiFlyHQ/WiFlyHQ.h:354:42: error: ISO C++ forbids declaration of str with no type [-fpermissive].

Thanks for the continued work on the library. I will updating the local version of the library.

@harlequin-tech
Copy link
Owner

Hi,

this should have been handle by the following line in WiFlyHQ.h:

#if (ARDUINO >= 103)
typedef const char PROGMEM prog_char;
#endif

Actually, if you are building for an ARM target then you would need to add a line to do the same for the ARM I think.

On 7/02/2014, at 7:18 am, Frank Saborn [email protected] wrote:

Hello,

I have updated the wiFlyHQ library on the alamode / raspberry pi setup. I wanted to let you know that there are still compiler errors.

In file included from wfly_test.cpp:12:0:
/usr/share/arduino/libraries/WiFlyHQ/WiFlyHQ.h:333:27: error: prog_char does not name a type
/usr/share/arduino/libraries/WiFlyHQ/WiFlyHQ.h:333:38: error: ISO C++ forbids declaration of str with no type [-fpermissive]
/usr/share/arduino/libraries/WiFlyHQ/WiFlyHQ.h:334:31: error: prog_char does not name a type
/usr/share/arduino/libraries/WiFlyHQ/WiFlyHQ.h:334:46: error: ISO C++ forbids declaration of str with no type [-fpermissive]
/usr/share/arduino/libraries/WiFlyHQ/WiFlyHQ.h:336:23: error: prog_char does not name a type
/usr/share/arduino/libraries/WiFlyHQ/WiFlyHQ.h:336:34: error: ISO C++ forbids declaration of str with no type [-fpermissive]
/usr/share/arduino/libraries/WiFlyHQ/WiFlyHQ.h:350:26: error: prog_char does not name a type
/usr/share/arduino/libraries/WiFlyHQ/WiFlyHQ.h:350:37: error: ISO C++ forbids declaration of cmd with no type [-fpermissive]
/usr/share/arduino/libraries/WiFlyHQ/WiFlyHQ.h:351:26: error: prog_char does not name a type
/usr/share/arduino/libraries/WiFlyHQ/WiFlyHQ.h:351:37: error: ISO C++ forbids declaration of opt with no type [-fpermissive]
/usr/share/arduino/libraries/WiFlyHQ/WiFlyHQ.h:354:31: error: prog_char does not name a type
/usr/share/arduino/libraries/WiFlyHQ/WiFlyHQ.h:354:42: error: ISO C++ forbids declaration of str with no type [-fpermissive].

Thanks for the continued work on the library. I will updating the local version of the library.


Reply to this email directly or view it on GitHub.

@psegov
Copy link
Author

psegov commented Feb 7, 2014

That is what I thought too.. Was really excited to see the updates.. I am using raspiberry pi as my development platform which is arm based.

Frank Sanborn
FEMA / HHS (ASPR) Innovation Fellow
202.699.0736

  • Sent from my iPad

On Feb 7, 2014, at 2:29 PM, Harlequin [email protected] wrote:

Hi,

this should have been handle by the following line in WiFlyHQ.h:

#if (ARDUINO >= 103)
typedef const char PROGMEM prog_char;
#endif

Actually, if you are building for an ARM target then you would need to add a line to do the same for the ARM I think.

On 7/02/2014, at 7:18 am, Frank Saborn [email protected] wrote:

Hello,

I have updated the wiFlyHQ library on the alamode / raspberry pi setup. I wanted to let you know that there are still compiler errors.

In file included from wfly_test.cpp:12:0:
/usr/share/arduino/libraries/WiFlyHQ/WiFlyHQ.h:333:27: error: prog_char does not name a type
/usr/share/arduino/libraries/WiFlyHQ/WiFlyHQ.h:333:38: error: ISO C++ forbids declaration of str with no type [-fpermissive]
/usr/share/arduino/libraries/WiFlyHQ/WiFlyHQ.h:334:31: error: prog_char does not name a type
/usr/share/arduino/libraries/WiFlyHQ/WiFlyHQ.h:334:46: error: ISO C++ forbids declaration of str with no type [-fpermissive]
/usr/share/arduino/libraries/WiFlyHQ/WiFlyHQ.h:336:23: error: prog_char does not name a type
/usr/share/arduino/libraries/WiFlyHQ/WiFlyHQ.h:336:34: error: ISO C++ forbids declaration of str with no type [-fpermissive]
/usr/share/arduino/libraries/WiFlyHQ/WiFlyHQ.h:350:26: error: prog_char does not name a type
/usr/share/arduino/libraries/WiFlyHQ/WiFlyHQ.h:350:37: error: ISO C++ forbids declaration of cmd with no type [-fpermissive]
/usr/share/arduino/libraries/WiFlyHQ/WiFlyHQ.h:351:26: error: prog_char does not name a type
/usr/share/arduino/libraries/WiFlyHQ/WiFlyHQ.h:351:37: error: ISO C++ forbids declaration of opt with no type [-fpermissive]
/usr/share/arduino/libraries/WiFlyHQ/WiFlyHQ.h:354:31: error: prog_char does not name a type
/usr/share/arduino/libraries/WiFlyHQ/WiFlyHQ.h:354:42: error: ISO C++ forbids declaration of str with no type [-fpermissive].

Thanks for the continued work on the library. I will updating the local version of the library.


Reply to this email directly or view it on GitHub.


Reply to this email directly or view it on GitHub.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

5 participants