Pages: [1]   Go Down
Author Topic: Tyring to get Ethernet2 lib to work  (Read 2142 times)
0 Members and 1 Guest are viewing this topic.
0
Offline Offline
Newbie
*
Karma: 0
Posts: 14
Arduino rocks
View Profile
 Bigger Bigger  Smaller Smaller  Reset Reset

I'm at a bit of a loss on how to replace the Standard Ethernet library with the one created by Peter from Tinker.it. http://code.google.com/p/tinkerit/source/browse/#svn/trunk/Ethernet2%20library/Ethernet2

I've got it downloaded OK, but when I try and use it the original Client.cpp is linked into my code not the new version form the ethernet2 library.

Do I have to merge the two overwriting the old versions and adding new files such as Ethernet2.h ?

All help gratefully received by this beginner.

Andy
Logged

Florida
Offline Offline
Full Member
***
Karma: 0
Posts: 171
1 Cor 10:31
View Profile
WWW
 Bigger Bigger  Smaller Smaller  Reset Reset

ethernet2 is a completely different library, so it needs its own folder in the libraries folder. You shouldnt put ethernet2 stuff in the ethernet folder. also, you have to change the #include <ethernet.h> to #include <ethernet2.h> and then original client should work fine. Also, if you want to make it really easy on yourself, the entire ethernet2 folder is all nicely zipped up so all you have to do is unzip it into your hardware->libraries folder. its in this post: http://www.arduino.cc/cgi-bin/yabb2/YaBB.pl?num=1233499187
Logged

0
Offline Offline
Newbie
*
Karma: 0
Posts: 11
Arduino rocks
View Profile
 Bigger Bigger  Smaller Smaller  Reset Reset

I also had to delete the Print.h and Print.c file with arduino0017
Logged

0
Offline Offline
Newbie
*
Karma: 0
Posts: 1
View Profile
 Bigger Bigger  Smaller Smaller  Reset Reset

I got the following error when trying to compile using the ethernet2 library:

D:\Arduino\Dev\arduino-0017\hardware\libraries\Ethernet2\Server.cpp:75: error: 'EthernetClass' has not been declared

Any ideas what I might have done wrong?
Logged

0
Offline Offline
Newbie
*
Karma: 0
Posts: 1
Arduino rocks
View Profile
 Bigger Bigger  Smaller Smaller  Reset Reset

i got the same error with RonCangro:

/Applications/arduino-0017/Arduino.app/Contents/Resources/Java/hardware/libraries/Ethernet2/Server.cpp:75: error: 'EthernetClass' has not been declared

Help please
Logged

0
Offline Offline
Newbie
*
Karma: 0
Posts: 1
Arduino rocks
View Profile
 Bigger Bigger  Smaller Smaller  Reset Reset

If you open up Server.cpp and change the line
Code:
#include "Ethernet.h"

to

Code:
#include "Ethernet2.h"

You should be able to compile now.

You can open the file in notepad but it will make more sense if you open it in something like Visual Studio.
Logged

0
Offline Offline
Newbie
*
Karma: 0
Posts: 9
Arduino rocks
View Profile
 Bigger Bigger  Smaller Smaller  Reset Reset

That workt, but now i get a new compiling error:
Print.cpp:132: multiple definition of Print::prinln(long, int)

using using Arduino 0018

Please help me.
Tanks
Logged

Pages: [1]   Go Up
Jump to: