EthernetDHCP not declared in this scope

Home Forums Botanicalls Community EthernetDHCP not declared in this scope

This topic contains 0 replies, has 2 voices, and was last updated by  macascos 7 years, 10 months ago.

Viewing 10 posts - 1 through 10 (of 10 total)
  • Author
    Posts
  • #1487

    macascos
    Participant

    Hi, I think this might be small mistake, but I cant seem to find the solution.

    Im getting the error above and the Arduino tries to explain what is going on.

    In file included from BotanicallsTwitter2.cpp:3:

    /Users/marco/Documents/Arduino/libraries/Twitter/Twitter.h:21:25: error: EthernetDNS.h: No such file or directory

    BotanicallsTwitter2.cpp:27:138: error: EthernetDHCP.h: No such file or directory

    BotanicallsTwitter2.cpp: In function ‘void setup()’:

    BotanicallsTwitter2:103: error: ‘EthernetDHCP’ was not declared in this scope

    BotanicallsTwitter2.cpp: In function ‘void loop()’:

    BotanicallsTwitter2:142: error: ‘EthernetDHCP’ was not declared in this scope

    can you help me out?

    thanks

    #1815

    Rob Faludi
    Keymaster

    Did you install the EthernetDHCP library as described in the Customize page? Double-check that, and if you’re sure you’ve got all the libraries where they should be, let us know which version of the Arduino IDE you are using.

    #1816

    macascos
    Participant

    I believe I installed all the libraries. They are all in a folder called libraries inside the Botanicalls folder. I imported them using Sketch/add library

    I also added the DHCP files that end .h and cpp.

    I erased my Arduino and installed it again.

    I get all these errors

    In file included from BotanicallsTwitter2.cpp:1:

    /Users/marco/Documents/Arduino/libraries/Twitter/Twitter.h:18:17: error: SPI.h: No such file or directory

    /Users/marco/Documents/Arduino/libraries/Twitter/Twitter.h:21:25: error: EthernetDNS.h: No such file or directory

    BotanicallsTwitter2.cpp:33:138: error: EthernetDHCP.h: No such file or directory

    In file included from BotanicallsTwitter2.cpp:1:

    /Users/marco/Documents/Arduino/libraries/Twitter/Twitter.h:29: error: cannot declare field ‘Twitter::client’ to be of abstract type ‘Client’

    /Applications/Arduino.app/Contents/Resources/Java/hardware/arduino/cores/arduino/Client.h:7: note: because the following virtual functions are pure within ‘Client’:

    /Applications/Arduino.app/Contents/Resources/Java/hardware/arduino/cores/arduino/Client.h:12: note: virtual size_t Client::write(uint8_t)

    /Applications/Arduino.app/Contents/Resources/Java/hardware/arduino/cores/arduino/Client.h:13: note: virtual size_t Client::write(const uint8_t*, size_t)

    /Applications/Arduino.app/Contents/Resources/Java/hardware/arduino/cores/arduino/Client.h:14: note: virtual int Client::available()

    /Applications/Arduino.app/Contents/Resources/Java/hardware/arduino/cores/arduino/Client.h:15: note: virtual int Client::read()

    /Applications/Arduino.app/Contents/Resources/Java/hardware/arduino/cores/arduino/Client.h:17: note: virtual int Client::peek()

    /Applications/Arduino.app/Contents/Resources/Java/hardware/arduino/cores/arduino/Client.h:18: note: virtual void Client::flush()

    /Applications/Arduino.app/Contents/Resources/Java/hardware/arduino/cores/arduino/Client.h:10: note: virtual int Client::connect(IPAddress, uint16_t)

    /Applications/Arduino.app/Contents/Resources/Java/hardware/arduino/cores/arduino/Client.h:11: note: virtual int Client::connect(const char*, uint16_t)

    /Applications/Arduino.app/Contents/Resources/Java/hardware/arduino/cores/arduino/Client.h:16: note: virtual int Client::read(uint8_t*, size_t)

    /Applications/Arduino.app/Contents/Resources/Java/hardware/arduino/cores/arduino/Client.h:19: note: virtual void Client::stop()

    /Applications/Arduino.app/Contents/Resources/Java/hardware/arduino/cores/arduino/Client.h:20: note: virtual uint8_t Client::connected()

    /Applications/Arduino.app/Contents/Resources/Java/hardware/arduino/cores/arduino/Client.h:21: note: virtual Client::operator bool()

    BotanicallsTwitter2.cpp: In function ‘void setup()’:

    BotanicallsTwitter2.pde:-1: error: ‘EthernetDHCP’ was not declared in this scope

    BotanicallsTwitter2.cpp: In function ‘void loop()’:

    BotanicallsTwitter2.pde:-1: error: ‘EthernetDHCP’ was not declared in this scope

    #1817

    macascos
    Participant

    I already switched to Arduino 0018, still get same errors.

    #1818

    Rob Faludi
    Keymaster

    This should work. It sounds like your path to the libraries is broken. What’s the current path to, for example, EthernetDNS.h ?

    #1819

    macascos
    Participant

    Would this be the path?

    Documents/Arduino/BotanicallsTwitter2/libraries/ArduinoEthernet/EthernetDNS/EthernetDNS.h

    #1820

    macascos
    Participant

    This seems right no?

    #1821

    Rob Faludi
    Keymaster

    No the correct path would be ~/Documents/Arduino/libraries/ArduinoEthernet/EthernetDNS/EthernetDNS.h

    Check the library documentation linked to online.

    #1822

    macascos
    Participant

    I was following this,

    Libraries go into the main Arduino document folder. Here’s some instructions from the Arduino site “To install third-party libraries, create a directory called libraries within your sketchbook directory. Then unzip the library there. For example, to install the Twitter library, its files should be in the/libraries/Twitter sub-folder of your sketchbook folder.”

    and I have also tried putting the libraries where you told me.

    I have libraries now in both places, but still cannot compile the code.

    When I do import library Ethernet, I see no new line at the top like the other libraries. Do you think this might be the issue?

    #1823

    macascos
    Participant

    It seems I had to have each library in its own folder within libraries, not within the ArduinoEthernet. Thanks!

    However….

Viewing 10 posts - 1 through 10 (of 10 total)

You must be logged in to reply to this topic.



New kits are here!

Categories

Pothos Plant Tweets

    Flickr Feed

    www.flickr.com
    More photos or video tagged with botanicalls on Flickr

    Meta