Errors compiling arduino software v1.01 + botanicalls 2 v3.01

Home Forums Botanicalls Community Errors compiling arduino software v1.01 + botanicalls 2 v3.01

Viewing 7 posts - 1 through 7 (of 7 total)
  • Author
    Posts
  • #1569
    kf4ixm
    Participant

    i get an error trying to compile the code. …

    C:Documents and SettingsMikeMy DocumentsDownloadsarduino-1.0.1-windowsarduino-1.0.1librariesEthernetDHCPEthernetDHCP.cpp:28:23: error: wiring.h: No such file or directory<br />
    C:Documents and SettingsMikeMy DocumentsDownloadsarduino-1.0.1-windowsarduino-1.0.1librariesEthernetDHCPEthernetDHCP.cpp: In member function 'int EthernetDHCPClass::begin(uint8_t*, int)':<br />
    C:Documents and SettingsMikeMy DocumentsDownloadsarduino-1.0.1-windowsarduino-1.0.1librariesEthernetDHCPEthernetDHCP.cpp:121: error: 'delay' was not declared in this scope<br />
    C:Documents and SettingsMikeMy DocumentsDownloadsarduino-1.0.1-windowsarduino-1.0.1librariesEthernetDHCPEthernetDHCP.cpp: In member function 'int EthernetDHCPClass::_startDHCPSession()':<br />
    C:Documents and SettingsMikeMy DocumentsDownloadsarduino-1.0.1-windowsarduino-1.0.1librariesEthernetDHCPEthernetDHCP.cpp:159: error: 'millis' was not declared in this scope<br />
    C:Documents and SettingsMikeMy DocumentsDownloadsarduino-1.0.1-windowsarduino-1.0.1librariesEthernetDHCPEthernetDHCP.cpp: In member function 'int EthernetDHCPClass::_closeDHCPSession()':<br />
    C:Documents and SettingsMikeMy DocumentsDownloadsarduino-1.0.1-windowsarduino-1.0.1librariesEthernetDHCPEthernetDHCP.cpp:173: warning: no return statement in function returning non-void<br />
    C:Documents and SettingsMikeMy DocumentsDownloadsarduino-1.0.1-windowsarduino-1.0.1librariesEthernetDHCPEthernetDHCP.cpp: In member function 'int EthernetDHCPClass::_sendDhcpMessage(DhcpMessageType_t)':<br />
    C:Documents and SettingsMikeMy DocumentsDownloadsarduino-1.0.1-windowsarduino-1.0.1librariesEthernetDHCPEthernetDHCP.cpp:193: error: 'millis' was not declared in this scope<br />
    C:Documents and SettingsMikeMy DocumentsDownloadsarduino-1.0.1-windowsarduino-1.0.1librariesEthernetDHCPEthernetDHCP.cpp:227: warning: comparison between signed and unsigned integer expressions<br />
    C:Documents and SettingsMikeMy DocumentsDownloadsarduino-1.0.1-windowsarduino-1.0.1librariesEthernetDHCPEthernetDHCP.cpp:192: warning: unused variable 'addedClientIdentifier'<br />
    C:Documents and SettingsMikeMy DocumentsDownloadsarduino-1.0.1-windowsarduino-1.0.1librariesEthernetDHCPEthernetDHCP.cpp: In member function 'DhcpMessageType_t EthernetDHCPClass::_processDhcpReply()':<br />
    C:Documents and SettingsMikeMy DocumentsDownloadsarduino-1.0.1-windowsarduino-1.0.1librariesEthernetDHCPEthernetDHCP.cpp:389: warning: unused variable 'o'<br />
    C:Documents and SettingsMikeMy DocumentsDownloadsarduino-1.0.1-windowsarduino-1.0.1librariesEthernetDHCPEthernetDHCP.cpp:337: warning: unused variable 'opt_len'<br />
    C:Documents and SettingsMikeMy DocumentsDownloadsarduino-1.0.1-windowsarduino-1.0.1librariesEthernetDHCPEthernetDHCP.cpp: In member function 'DhcpState_t EthernetDHCPClass::poll()':<br />
    C:Documents and SettingsMikeMy DocumentsDownloadsarduino-1.0.1-windowsarduino-1.0.1librariesEthernetDHCPEthernetDHCP.cpp:488: error: 'millis' was not declared in this scope<br />
    C:Documents and SettingsMikeMy DocumentsDownloadsarduino-1.0.1-windowsarduino-1.0.1librariesEthernetDHCPEthernetDHCP.cpp:519: warning: suggest parentheses around assignment used as truth value<br />
    C:Documents and SettingsMikeMy DocumentsDownloadsarduino-1.0.1-windowsarduino-1.0.1librariesEthernetDHCPEthernetDHCP.cpp:563: warning: enumeration value 'DhcpStateNone' not handled in switch<br />
    C:Documents and SettingsMikeMy DocumentsDownloadsarduino-1.0.1-windowsarduino-1.0.1librariesEthernetDHCPEthernetDHCP.cpp:563: warning: enumeration value 'DhcpStateDiscovering' not handled in switch<br />
    C:Documents and SettingsMikeMy DocumentsDownloadsarduino-1.0.1-windowsarduino-1.0.1librariesEthernetDHCPEthernetDHCP.cpp:563: warning: enumeration value 'DhcpStateLeased' not handled in switch

    at first i was getting the dhcp not found error mentioned in this forum, but fixed that when i put the folders under the libraries folder, but now am getting this.

    Any ideas?

    • This topic was modified 7 years, 10 months ago by Rob Faludi.
    #1875
    drewc
    Participant

    Hi…I had some of the same issues but got things compiled and working well under 1.01 by doing the following:

    – Re EthernetDHCP, many of the libraries you need to include are back-level from IDE 1.0.1 and even 1.0. At 1.0, Wiring.h, String.h, WProgram.h and others were folded into Arduino.h. You may need to do as I did with EthernetDHCP.CPP and go into the .CPP files for each of the libraries that V3.01 includes (see the “include” statements in the front of the code) and swap out these deprecated names and replace with “arduino.h”. If you search across the Web for “arduino wiring.h” for example, you will see this mentioned in many examples. This should resolve most if not all of your “not found” and “not in scope” issues.

    Good luck and let us know how this works for you.

    #1876
    Joe
    Participant

    How exactly does one get the Botanicalls 2 V3.01 working with Arduino 1.01?

    I followed the advice about editing the libraries and changing Wiring.h, String.H, etc.. into Arduino.h. However, when I go to edit the library files, I get a the following error:

    “Bad file selected: Processing can only edit its own sketches or those and other files ending in .ino or .pde”

    I am using Arduino 1.01 on Mac OS X. Is there another program that I’m supposed to use to edit to libraries?

    I would very much appreciate it if someone would create and post an updated version of the Botanicalls code for Arduino 1.01.

    #1877
    Joe
    Participant

    I figured out how to edit the libraries on Mac OS X. Instead of opening the library files in the Arduino IDE, you open them in a text editor. After changing instances of wiring.h, string.h into Arduino.h, the program now compiles on Arduino 1.01. I haven’t yet sent the new program to the Botanicalls yet.

    Thanks for the tips.

    #1878
    squigley
    Participant

    I’m getting the same issues. I changed the reference to wiring.h to Arduino.h, and removed the include of string.h (since changing it to Arduino.h seems redundant).

    When I try to verify/compile, I get the following:

    In file included from /home/squigley/Downloads/arduino-1.0.1/hardware/arduino/cores/arduino/Arduino.h:192,
    from /home/squigley/Downloads/arduino-1.0.1/libraries/EthernetDHCP/EthernetDHCP.cpp:27:
    /home/squigley/Downloads/arduino-1.0.1/hardware/arduino/cores/arduino/WString.h:116: error: declaration of C function ‘StringSumHelper& operator+(const StringSumHelper&, const char*)’ conflicts with
    /home/squigley/Downloads/arduino-1.0.1/hardware/arduino/cores/arduino/WString.h:115: error: previous declaration ‘StringSumHelper& operator+(const StringSumHelper&, const String&)’ here
    /home/squigley/Downloads/arduino-1.0.1/hardware/arduino/cores/arduino/WString.h:117: error: declaration of C function ‘StringSumHelper& operator+(const StringSumHelper&, char)’ conflicts with
    /home/squigley/Downloads/arduino-1.0.1/hardware/arduino/cores/arduino/WString.h:116: error: previous declaration ‘StringSumHelper& operator+(const StringSumHelper&, const char*)’ here
    /home/squigley/Downloads/arduino-1.0.1/hardware/arduino/cores/arduino/WString.h:118: error: declaration of C function ‘StringSumHelper& operator+(const StringSumHelper&, unsigned char)’ conflicts with
    /home/squigley/Downloads/arduino-1.0.1/hardware/arduino/cores/arduino/WString.h:117: error: previous declaration ‘StringSumHelper& operator+(const StringSumHelper&, char)’ here
    /home/squigley/Downloads/arduino-1.0.1/hardware/arduino/cores/arduino/WString.h:119: error: declaration of C function ‘StringSumHelper& operator+(const StringSumHelper&, int)’ conflicts with
    /home/squigley/Downloads/arduino-1.0.1/hardware/arduino/cores/arduino/WString.h:118: error: previous declaration ‘StringSumHelper& operator+(const StringSumHelper&, unsigned char)’ here
    /home/squigley/Downloads/arduino-1.0.1/hardware/arduino/cores/arduino/WString.h:120: error: declaration of C function ‘StringSumHelper& operator+(const StringSumHelper&, unsigned int)’ conflicts with
    /home/squigley/Downloads/arduino-1.0.1/hardware/arduino/cores/arduino/WString.h:119: error: previous declaration ‘StringSumHelper& operator+(const StringSumHelper&, int)’ here
    /home/squigley/Downloads/arduino-1.0.1/hardware/arduino/cores/arduino/WString.h:121: error: declaration of C function ‘StringSumHelper& operator+(const StringSumHelper&, long int)’ conflicts with
    /home/squigley/Downloads/arduino-1.0.1/hardware/arduino/cores/arduino/WString.h:120: error: previous declaration ‘StringSumHelper& operator+(const StringSumHelper&, unsigned int)’ here
    /home/squigley/Downloads/arduino-1.0.1/hardware/arduino/cores/arduino/WString.h:122: error: declaration of C function ‘StringSumHelper& operator+(const StringSumHelper&, long unsigned int)’ conflicts with
    /home/squigley/Downloads/arduino-1.0.1/hardware/arduino/cores/arduino/WString.h:121: error: previous declaration ‘StringSumHelper& operator+(const StringSumHelper&, long int)’ here
    In file included from /home/squigley/Downloads/arduino-1.0.1/libraries/EthernetDHCP/EthernetDHCP.cpp:27:
    /home/squigley/Downloads/arduino-1.0.1/hardware/arduino/cores/arduino/Arduino.h:196: error: declaration of C function ‘uint16_t makeWord(byte, byte)’ conflicts with
    /home/squigley/Downloads/arduino-1.0.1/hardware/arduino/cores/arduino/Arduino.h:195: error: previous declaration ‘uint16_t makeWord(uint16_t)’ here
    /home/squigley/Downloads/arduino-1.0.1/hardware/arduino/cores/arduino/Arduino.h:206: error: declaration of C function ‘long int random(long int)’ conflicts with
    /home/squigley/Downloads/arduino-1.0.1/hardware/tools/avr/bin/../lib/gcc/avr/4.3.2/../../../avr/include/stdlib.h:504: error: previous declaration ‘long int random()’ here
    /home/squigley/Downloads/arduino-1.0.1/hardware/arduino/cores/arduino/Arduino.h:207: error: declaration of C function ‘long int random(long int, long int)’ conflicts with
    /home/squigley/Downloads/arduino-1.0.1/hardware/arduino/cores/arduino/Arduino.h:206: error: previous declaration ‘long int random(long int)’ here

    #1879
    squigley
    Participant

    Ok, I worked it out.

    References to wiring.h and string.h within the “extern C” function need to be removed/commented out, and #include “Arduino.h” needs to be added above that, outside the function, in EthernetCompat.cpp, EthernetDNS.cpp and EthernetDHCP.cpp.

    Then I was able to get it verify/compile.

    #2209
    jpatapoff
    Participant

    I can verify that following squigley’s instructions fixed the verification/compilation issues. I made the changes and pushed up to guithub so the next time someone comes across this issue, it should be easier to get started. See:
    https://github.com/jpatapoff/EthernetDHCP
    https://github.com/jpatapoff/EthernetDNS

Viewing 7 posts - 1 through 7 (of 7 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