Go Down

Topic: Error when writing to arduino using the WebServer ethernet example. (Read 1 time) previous topic - next topic

Stigern

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

Code: [Select]

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?
I'm from Norway!

zoomkat

Your errors may depend on your code and the IDE you are using.
Google forum search: Use Google Advanced Search and use Http://forum.arduino.cc/index in the "site or domain:" box.

Stigern

#2
Oct 21, 2011, 09:47 pm Last Edit: Oct 21, 2011, 09:52 pm by Stigern Reason: 1

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
I'm from Norway!

PaulS

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.

Stigern

#4
Oct 21, 2011, 09:53 pm Last Edit: Oct 21, 2011, 09:55 pm by Stigern Reason: 1

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: [Select]

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

void setup()
{

}

void loop()
{

}

I'm from Norway!

PaulS

Quote
Even this won't compile :S

I'm pretty sure you saw something more than "Nope, not going to compile that!".

Stigern


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: [Select]

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

void setup()
{

}

void loop()
{

}
I'm from Norway!

PaulS

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.

Stigern


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
I'm from Norway!

PaulS

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

Stigern


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
I'm from Norway!

zoomkat

I compiled the webserver included in the 0022 IDE without any errors. When in doubt, reboot!
Google forum search: Use Google Advanced Search and use Http://forum.arduino.cc/index in the "site or domain:" box.

PaulS

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

Stigern


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 :P
I'm from Norway!

PaulS

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.

Go Up