Go Down

Topic: Error Compiling Message (Read 1 time) previous topic - next topic

marekcsa

I just bought some ENC28J60 Internet Shields and hooked one up to an Uno, swapped the libraries, loaded one of the Example programs under Ethernet, and am getting an Error Compiling Message with no specific information that could help me fix the program.  Any ideas what is going on?

CrossRoads

"Any ideas what is going on? "
Not without seeing the message.
Designing & building electrical circuits for over 25 years. Check out the ATMega1284P based Bobuino and other '328P & '1284P creations & offerings at  www.crossroadsfencing.com/BobuinoRev17.
Arduino for Teens available at Amazon.com.

marekcsa

OK, so here it is. I did not know how to past a screenshot in here.  The program is the Example called WebClient.

Thanks


Error Compiling.

In file included from C:\Users\Host Guest\Desktop\arduino-1.0.1\libraries\Ethernet/Ethernet.h:5,
                 from WebClient.cpp:1:
C:\Users\Host Guest\Desktop\arduino-1.0.1\libraries\Ethernet/Client.h:22: error: conflicting return type specified for 'virtual void Client::write(uint8_t)'
C:\Users\Host Guest\Desktop\arduino-1.0.1\hardware\arduino\cores\arduino/Print.h:48: error:   overriding 'virtual size_t Print::write(uint8_t)'
C:\Users\Host Guest\Desktop\arduino-1.0.1\libraries\Ethernet/Client.h:24: error: conflicting return type specified for 'virtual void Client::write(const uint8_t*, size_t)'

C:\Users\Host Guest\Desktop\arduino-1.0.1\hardware\arduino\cores\arduino/Print.h:50: error:   overriding 'virtual size_t Print::write(const uint8_t*, size_t)'
In file included from C:\Users\Host Guest\Desktop\arduino-1.0.1\libraries\Ethernet/Ethernet.h:6,
                 from WebClient.cpp:1:
C:\Users\Host Guest\Desktop\arduino-1.0.1\libraries\Ethernet/Server.h:16: error: conflicting return type specified for 'virtual void Server::write(uint8_t)'
C:\Users\Host Guest\Desktop\arduino-1.0.1\hardware\arduino\cores\arduino/Print.h:48: error:   overriding 'virtual size_t Print::write(uint8_t)'
C:\Users\Host Guest\Desktop\arduino-1.0.1\libraries\Ethernet/Server.h:18: error: conflicting return type specified for 'virtual void Server::write(const uint8_t*, size_t)'
C:\Users\Host Guest\Desktop\arduino-1.0.1\hardware\arduino\cores\arduino/Print.h:50: error:   overriding 'virtual size_t Print::write(const uint8_t*, size_t)'

CrossRoads

What you posted is fine - screen shots are difficult to see.
I don't know anything about that shield or the library, I am sure someone with experience with it will help out.
Designing & building electrical circuits for over 25 years. Check out the ATMega1284P based Bobuino and other '328P & '1284P creations & offerings at  www.crossroadsfencing.com/BobuinoRev17.
Arduino for Teens available at Amazon.com.

PaulS

Quote
I just bought some ENC28J60 Internet Shields and hooked one up to an Uno, swapped the libraries, loaded one of the Example programs under Ethernet

You have to explain, in a lot more detail, exactly what "swapped the libraries" means.

You should NOT have deleted or replaced ANY of the libraries in C:\Users\Host Guest\Desktop\arduino-1.0.1\libraries. That is where the Arduino-provided libraries go. Though why the IDE was installed on the desktop is mystery.

User downloaded libraries, such as WebClient and EtherCard (the library for the ENC28J60 cards) go in the libraries folder (you may need to create it) of the sketch directory.

The messages in the last post indicate that Client.h has not been updated for post 1.0 use. The messages are pretty explicit about what needs to be changed.

Quote
Client.h:22: error: conflicting return type specified for 'virtual void Client::write(uint8_t)'

The file name is specified, the line number that the error is on, and exactly what the problem is (void should be size_t). You'll need to edit the .h file, and the .cpp file, to change the type, and to add a return statement to the function (return the number of characters actually written, usually 1).

Go Up