Pages: [1]   Go Down
Author Topic: Error when writing to arduino using the WebServer ethernet example.  (Read 1408 times)
0 Members and 1 Guest are viewing this topic.
Norway
Offline Offline
Jr. Member
**
Karma: 0
Posts: 79
<3 Arduino
View Profile
WWW
 Bigger Bigger  Smaller Smaller  Reset Reset

Can't figure out why it gives me this long list of errors:

Code:
In file included from E:\Programming\Arduino\Arduino\libraries\Ethernet\utility\/w5100.h:14,
                 from E:\Programming\Arduino\Arduino\libraries\Ethernet\utility\socket.c:10:
E:\Programming\Arduino\Arduino\libraries\Spi/SPI.h:36: error: expected '=', ',', ';', 'asm' or '__attribute__' before 'SPIClass'
E:\Programming\Arduino\Arduino\libraries\Spi/SPI.h:53: error: expected '=', ',', ';', 'asm' or '__attribute__' before 'SPI'
E:\Programming\Arduino\Arduino\libraries\Spi/SPI.h:55: error: expected '=', ',', ';', 'asm' or '__attribute__' before ':' token
E:\Programming\Arduino\Arduino\libraries\Spi/SPI.h:62: error: expected '=', ',', ';', 'asm' or '__attribute__' before ':' token
E:\Programming\Arduino\Arduino\libraries\Spi/SPI.h:66: error: expected '=', ',', ';', 'asm' or '__attribute__' before ':' token
In file included from E:\Programming\Arduino\Arduino\libraries\Ethernet\utility\socket.c:10:
E:\Programming\Arduino\Arduino\libraries\Ethernet\utility\/w5100.h:18: error: redefinition of typedef 'SOCKET'
E:\Programming\Arduino\Arduino\libraries\Ethernet\utility\/types.h:137: error: previous declaration of 'SOCKET' was here
E:\Programming\Arduino\Arduino\libraries\Ethernet\utility\/w5100.h:49: error: expected '=', ',', ';', 'asm' or '__attribute__' before 'SnMR'
E:\Programming\Arduino\Arduino\libraries\Ethernet\utility\/w5100.h:87: error: expected '=', ',', ';', 'asm' or '__attribute__' before 'SnIR'
E:\Programming\Arduino\Arduino\libraries\Ethernet\utility\/w5100.h:96: error: expected '=', ',', ';', 'asm' or '__attribute__' before 'SnSR'
E:\Programming\Arduino\Arduino\libraries\Ethernet\utility\/w5100.h:115: error: expected '=', ',', ';', 'asm' or '__attribute__' before 'IPPROTO'
E:\Programming\Arduino\Arduino\libraries\Ethernet\utility\/w5100.h:129: error: expected '=', ',', ';', 'asm' or '__attribute__' before 'W5100Class'
E:\Programming\Arduino\Arduino\libraries\Ethernet\utility\/w5100.h:323: error: expected '=', ',', ';', 'asm' or '__attribute__' before 'W5100'
E:\Programming\Arduino\Arduino\libraries\Ethernet\utility\/w5100.h:325: error: expected '=', ',', ';', 'asm' or '__attribute__' before ':' token
E:\Programming\Arduino\Arduino\libraries\Ethernet\utility\/w5100.h:329: error: expected '=', ',', ';', 'asm' or '__attribute__' before ':' token
E:\Programming\Arduino\Arduino\libraries\Ethernet\utility\/w5100.h:333: error: expected '=', ',', ';', 'asm' or '__attribute__' before ':' token
E:\Programming\Arduino\Arduino\libraries\Ethernet\utility\/w5100.h:337: error: expected '=', ',', ';', 'asm' or '__attribute__' before ':' token
E:\Programming\Arduino\Arduino\libraries\Ethernet\utility\/w5100.h:341: error: expected '=', ',', ';', 'asm' or '__attribute__' before ':' token
E:\Programming\Arduino\Arduino\libraries\Ethernet\utility\/w5100.h:345: error: expected '=', ',', ';', 'asm' or '__attribute__' before ':' token
E:\Programming\Arduino\Arduino\libraries\Ethernet\utility\/w5100.h:349: error: expected '=', ',', ';', 'asm' or '__attribute__' before ':' token
E:\Programming\Arduino\Arduino\libraries\Ethernet\utility\/w5100.h:353: error: expected '=', ',', ';', 'asm' or '__attribute__' before ':' token
E:\Programming\Arduino\Arduino\libraries\Ethernet\utility\/w5100.h:357: error: expected '=', ',', ';', 'asm' or '__attribute__' before ':' token
E:\Programming\Arduino\Arduino\libraries\Ethernet\utility\/w5100.h:361: error: expected '=', ',', ';', 'asm' or '__attribute__' before ':' token
E:\Programming\Arduino\Arduino\libraries\Ethernet\utility\/w5100.h:365: error: expected '=', ',', ';', 'asm' or '__attribute__' before ':' token
E:\Programming\Arduino\Arduino\libraries\Ethernet\utility\/w5100.h:369: error: expected '=', ',', ';', 'asm' or '__attribute__' before ':' token
E:\Programming\Arduino\Arduino\libraries\Ethernet\utility\/w5100.h:373: error: expected '=', ',', ';', 'asm' or '__attribute__' before ':' token
E:\Programming\Arduino\Arduino\libraries\Ethernet\utility\/w5100.h:377: error: expected '=', ',', ';', 'asm' or '__attribute__' before ':' token
E:\Programming\Arduino\Arduino\libraries\Ethernet\utility\socket.c: In function 'socket':
E:\Programming\Arduino\Arduino\libraries\Ethernet\utility\socket.c:31: error: 'Sn_MR_TCP' undeclared (first use in this function)
E:\Programming\Arduino\Arduino\libraries\Ethernet\utility\socket.c:31: error: (Each undeclared identifier is reported only once
E:\Programming\Arduino\Arduino\libraries\Ethernet\utility\socket.c:31: error: for each function it appears in.)
E:\Programming\Arduino\Arduino\libraries\Ethernet\utility\socket.c:31: error: 'Sn_MR_UDP' undeclared (first use in this function)
E:\Programming\Arduino\Arduino\libraries\Ethernet\utility\socket.c:31: error: 'Sn_MR_IPRAW' undeclared (first use in this function)
E:\Programming\Arduino\Arduino\libraries\Ethernet\utility\socket.c:31: error: 'Sn_MR_MACRAW' undeclared (first use in this function)
E:\Programming\Arduino\Arduino\libraries\Ethernet\utility\socket.c:31: error: 'Sn_MR_PPPOE' undeclared (first use in this function)
E:\Programming\Arduino\Arduino\libraries\Ethernet\utility\socket.c:43: error: 'Sn_CR_OPEN' undeclared (first use in this function)
E:\Programming\Arduino\Arduino\libraries\Ethernet\utility\socket.c: In function 'close':
E:\Programming\Arduino\Arduino\libraries\Ethernet\utility\socket.c:71: error: 'Sn_CR_CLOSE' undeclared (first use in this function)
E:\Programming\Arduino\Arduino\libraries\Ethernet\utility\socket.c: In function 'listen':
E:\Programming\Arduino\Arduino\libraries\Ethernet\utility\socket.c:101: error: 'SOCK_INIT' undeclared (first use in this function)
E:\Programming\Arduino\Arduino\libraries\Ethernet\utility\socket.c:103: error: 'Sn_CR_LISTEN' undeclared (first use in this function)
E:\Programming\Arduino\Arduino\libraries\Ethernet\utility\socket.c: In function 'connect':
E:\Programming\Arduino\Arduino\libraries\Ethernet\utility\socket.c:155: error: 'Sn_CR_CONNECT' undeclared (first use in this function)
E:\Programming\Arduino\Arduino\libraries\Ethernet\utility\socket.c: In function 'disconnect':
E:\Programming\Arduino\Arduino\libraries\Ethernet\utility\socket.c:175: error: 'Sn_CR_DISCON' undeclared (first use in this function)
E:\Programming\Arduino\Arduino\libraries\Ethernet\utility\socket.c: In function 'send':
E:\Programming\Arduino\Arduino\libraries\Ethernet\utility\socket.c:209: error: 'SOCK_ESTABLISHED' undeclared (first use in this function)
E:\Programming\Arduino\Arduino\libraries\Ethernet\utility\socket.c:209: error: 'SOCK_CLOSE_WAIT' undeclared (first use in this function)
E:\Programming\Arduino\Arduino\libraries\Ethernet\utility\socket.c:221: error: 'Sn_CR_SEND' undeclared (first use in this function)
E:\Programming\Arduino\Arduino\libraries\Ethernet\utility\socket.c:232: error: 'Sn_IR_SEND_OK' undeclared (first use in this function)
E:\Programming\Arduino\Arduino\libraries\Ethernet\utility\socket.c:236: error: 'SOCK_CLOSED' undeclared (first use in this function)

Any ideas?
Logged

I'm from Norway!

0
Offline Offline
Tesla Member
***
Karma: 145
Posts: 9697
Arduino rocks
View Profile
 Bigger Bigger  Smaller Smaller  Reset Reset

Your errors may depend on your code and the IDE you are using.
Logged

Consider the daffodil. And while you're doing that, I'll be over here, looking through your stuff.   smiley-cool

Norway
Offline Offline
Jr. Member
**
Karma: 0
Posts: 79
<3 Arduino
View Profile
WWW
 Bigger Bigger  Smaller Smaller  Reset Reset

Your errors may depend on your code and the IDE you are using.

Loaded the example from the Arduino 022, and just pushed Upload. Didn't do any changes to the code at all.
Seems to be something with the Ethernet library, it won't compile any examples at all :S
« Last Edit: October 21, 2011, 02:52:10 pm by Stigern » Logged

I'm from Norway!

Seattle, WA USA
Offline Offline
Brattain Member
*****
Karma: 642
Posts: 50365
Seattle, WA USA
View Profile
 Bigger Bigger  Smaller Smaller  Reset Reset

Quote
Loaded the example from the Arduino 022, and just pushed Upload. Didn't do any changes to the code at all.
Did you select a board type? Is it the right one? What OS are you on?

Too much information is better than too little. Fee free to volunteer more than you think we need to know.
Logged

Norway
Offline Offline
Jr. Member
**
Karma: 0
Posts: 79
<3 Arduino
View Profile
WWW
 Bigger Bigger  Smaller Smaller  Reset Reset

Quote
Loaded the example from the Arduino 022, and just pushed Upload. Didn't do any changes to the code at all.
Did you select a board type? Is it the right one? What OS are you on?

Too much information is better than too little. Fee free to volunteer more than you think we need to know.

Windows 7 x64
Arduino 022 just downloaded.
Did select the correct board type, just tried the blink example and it works fine =)

EDIT:

Even this won't compile :S

Code:
#include <SPI.h>
#include <Ethernet.h>

void setup()
{

}

void loop()
{
 
}
« Last Edit: October 21, 2011, 02:55:01 pm by Stigern » Logged

I'm from Norway!

Seattle, WA USA
Offline Offline
Brattain Member
*****
Karma: 642
Posts: 50365
Seattle, WA USA
View Profile
 Bigger Bigger  Smaller Smaller  Reset Reset

Quote
Even this won't compile :S
I'm pretty sure you saw something more than "Nope, not going to compile that!".
Logged

Norway
Offline Offline
Jr. Member
**
Karma: 0
Posts: 79
<3 Arduino
View Profile
WWW
 Bigger Bigger  Smaller Smaller  Reset Reset

Quote
Even this won't compile :S
I'm pretty sure you saw something more than "Nope, not going to compile that!".

Yes, of course sorry was a littlebit quick there:

http://pastebin.com/WXeGxUd9

Thats the errors I'm geting using this code:

Code:
#include <SPI.h>
#include <Ethernet.h>

void setup()
{

}

void loop()
{
 
}
Logged

I'm from Norway!

Seattle, WA USA
Offline Offline
Brattain Member
*****
Karma: 642
Posts: 50365
Seattle, WA USA
View Profile
 Bigger Bigger  Smaller Smaller  Reset Reset

I get:
Quote
Binary sketch size: 450 bytes (of a 30720 byte maximum)
So, there is something wrong with one of the libraries that you downloaded.

Post your SPI.h and Ethernet.h files, for comparison.
Logged

Norway
Offline Offline
Jr. Member
**
Karma: 0
Posts: 79
<3 Arduino
View Profile
WWW
 Bigger Bigger  Smaller Smaller  Reset Reset

I get:
Quote
Binary sketch size: 450 bytes (of a 30720 byte maximum)
So, there is something wrong with one of the libraries that you downloaded.

Post your SPI.h and Ethernet.h files, for comparison.

Ethernet.h: http://pastebin.com/sCiRRSa3
SPI.h: http://pastebin.com/MX3ZfVPa
Logged

I'm from Norway!

Seattle, WA USA
Offline Offline
Brattain Member
*****
Karma: 642
Posts: 50365
Seattle, WA USA
View Profile
 Bigger Bigger  Smaller Smaller  Reset Reset

They look just like mine. Since you are getting different results, perhaps it's time to reveal what board type you are compiling for.
Logged

Norway
Offline Offline
Jr. Member
**
Karma: 0
Posts: 79
<3 Arduino
View Profile
WWW
 Bigger Bigger  Smaller Smaller  Reset Reset

They look just like mine. Since you are getting different results, perhaps it's time to reveal what board type you are compiling for.

Arduino Diecimila
Logged

I'm from Norway!

0
Offline Offline
Tesla Member
***
Karma: 145
Posts: 9697
Arduino rocks
View Profile
 Bigger Bigger  Smaller Smaller  Reset Reset

I compiled the webserver included in the 0022 IDE without any errors. When in doubt, reboot!
Logged

Consider the daffodil. And while you're doing that, I'll be over here, looking through your stuff.   smiley-cool

Seattle, WA USA
Offline Offline
Brattain Member
*****
Karma: 642
Posts: 50365
Seattle, WA USA
View Profile
 Bigger Bigger  Smaller Smaller  Reset Reset

I select that board type and compiled just fine. Perhaps you need to uninstall and reinstall the Arduino IDE.
Logged

Norway
Offline Offline
Jr. Member
**
Karma: 0
Posts: 79
<3 Arduino
View Profile
WWW
 Bigger Bigger  Smaller Smaller  Reset Reset

I select that board type and compiled just fine. Perhaps you need to uninstall and reinstall the Arduino IDE.

This is strange, I decided to try and unpack the Arduino IDE one more time. But instead of overwriting the files, I deleted the old ones first. And now it's compiling ! Thanks for all the great help, and I'm sorry for not trying this in the first place smiley-razz
Logged

I'm from Norway!

Seattle, WA USA
Offline Offline
Brattain Member
*****
Karma: 642
Posts: 50365
Seattle, WA USA
View Profile
 Bigger Bigger  Smaller Smaller  Reset Reset

Quote
I'm sorry for not trying this in the first place
You have nothing to apologize for. Re-installing the IDE was the last thing you should have had to do. Windows needs to figure out a better balance between paranoia (nobody can alter any file) and don't-give-a-damn (anybody can overwrite any file). Unix figured it out a long time ago.
Logged

Pages: [1]   Go Up
Jump to: