Announcement

Collapse
No announcement yet.

Errors compiling sketch 166

Collapse
X
 
  • Filter
  • Time
  • Show
Clear All
new posts

    Errors compiling sketch 166

    I have upgraded to latest API - attachement (API 146 and sketch 166). Something in the Arduino IDE (1.8.9 fresh install) is not right. Programmer is the AVRISP mkII which it defaults to. Using an UNO and v2 of the ether net shield. The ethernet built-in library is 2.0 see attached. Something is not set right in the IDE.


    (How do you guys paste a screenshot in a post, does not work in Chrome for me?)



    Need help with the compiler errors show below:


    C:\Users\farm-camera\Documents\HomeseerBoard1\HomeseerBoard1.ino:14:18: warning: ISO C++ forbids converting a string constant to 'char*' [-Wwrite-strings]

    char* Version = "1.0.0.166";

    ^~~~~~~~~~~

    In file included from C:\Program Files (x86)\Arduino\libraries\Ethernet2-master\src\Dns.cpp:7:0:

    C:\Program Files (x86)\Arduino\libraries\Ethernet2-master\src\Dns.cpp: In member function 'uint16_t DNSClient::BuildRequest(const char*)':

    C:\Program Files (x86)\Arduino\libraries\Ethernet2-master\src\utility/util.h:4:24: warning: result of '(256 << 8)' requires 18 bits to represent, but 'int' only has 16 bits [-Wshift-overflow=]

    #define htons(x) ( ((x)<< 8 & 0xFF00) | \

    ~~~^~~~

    C:\Program Files (x86)\Arduino\libraries\Ethernet2-master\src\Dns.cpp:202:21: note: in expansion of macro 'htons'

    twoByteBuffer = htons(QUERY_FLAG | OPCODE_STANDARD_QUERY | RECURSION_DESIRED_FLAG);

    ^~~~~

    Sketch uses 22936 bytes (71%) of program storage space. Maximum is 32256 bytes.
    Global variables use 1412 bytes (68%) of dynamic memory, leaving 636 bytes for local variables. Maximum is 2048 bytes.
    Attached Files

    #2
    I'm still having problems with the IDE compiling sketch 166.

    This compiler error message is common in several post over the last few months. I have not found a solution. I did the following:
    1) uninstall IDE
    2) restart HS3
    4) after HS# restart I get plugin configuration like others are getting.
    5) reinstall IDE
    6) download sketch

    I getting the same error again as other have gotten. The only thing I did not do was uninstall the plugin because I cannot find instructions on how to do this on a HS3 SEL system. Someone please help.

    C:\Users\farm-camera\Documents\HomeseerBoard1\HomeseerBoard1.ino:14:18: warning: ISO C++ forbids converting a string constant to 'char*' [-Wwrite-strings]

    char* Version = "1.0.0.166";

    ^~~~~~~~~~~

    In file included from C:\Program Files (x86)\Arduino\libraries\Ethernet2-master\src\Dns.cpp:7:0:

    C:\Program Files (x86)\Arduino\libraries\Ethernet2-master\src\Dns.cpp: In member function 'uint16_t DNSClient::BuildRequest(const char*)':

    C:\Program Files (x86)\Arduino\libraries\Ethernet2-master\src\utility/util.h:4:24: warning: result of '(256 << 8)' requires 18 bits to represent, but 'int' only has 16 bits [-Wshift-overflow=]

    #define htons(x) ( ((x)<< 8 & 0xFF00) | \

    ~~~^~~~

    C:\Program Files (x86)\Arduino\libraries\Ethernet2-master\src\Dns.cpp:202:21: note: in expansion of macro 'htons'

    twoByteBuffer = htons(QUERY_FLAG | OPCODE_STANDARD_QUERY | RECURSION_DESIRED_FLAG);

    ^~~~~

    Sketch uses 22936 bytes (71%) of program storage space. Maximum is 32256 bytes.
    Global variables use 1412 bytes (68%) of dynamic memory, leaving 636 bytes for local variables. Maximum is 2048 bytes.
    Attached Files

    Comment


      #3
      OK, so i did find the red x under title called instance. When one hovers over it, it says uninstall plugin. I see what happens next.

      Comment


        #4
        Unintalling everything, restarting HS3 and reinstalling left me with same compiler error. Anyone have suggestions?

        C:\Users\farm-camera\Documents\HomeseerBoard1\HomeseerBoard1.ino:14:18: warning: ISO C++ forbids converting a string constant to 'char*' [-Wwrite-strings]

        char* Version = "1.0.0.166";

        ^~~~~~~~~~~

        In file included from C:\Program Files (x86)\Arduino\libraries\Ethernet2-master\src\Dns.cpp:7:0:

        C:\Program Files (x86)\Arduino\libraries\Ethernet2-master\src\Dns.cpp: In member function 'uint16_t DNSClient::BuildRequest(const char*)':

        C:\Program Files (x86)\Arduino\libraries\Ethernet2-master\src\utility/util.h:4:24: warning: result of '(256 << 8)' requires 18 bits to represent, but 'int' only has 16 bits [-Wshift-overflow=]

        #define htons(x) ( ((x)<< 8 & 0xFF00) | \

        ~~~^~~~

        C:\Program Files (x86)\Arduino\libraries\Ethernet2-master\src\Dns.cpp:202:21: note: in expansion of macro 'htons'

        twoByteBuffer = htons(QUERY_FLAG | OPCODE_STANDARD_QUERY | RECURSION_DESIRED_FLAG);

        ^~~~~

        Sketch uses 22936 bytes (71%) of program storage space. Maximum is 32256 bytes.
        Global variables use 1412 bytes (68%) of dynamic memory, leaving 636 bytes for local variables. Maximum is 2048 bytes.

        Comment


          #5
          What you have posted are not errors but warnings and I don't think this should stop it from functioning. Is the sketch uploading to the board or is the build failing? Can you roll back the Ethershield definition and see if that helps?
          Zwave = Z-Stick, 3xHSM100� 7xACT ZDM230, 1xEverspring SM103, 2xACT HomePro ZRP210.
          X10 = CM12U, 2xAM12, 1xAW10, 1 x TM13U, 1xMS13, 2xHR10, 2xSS13
          Other Hardware = ADI Ocelot + secu16, Global Cache GC100, RFXtrx433, 3 x Foscams.
          Plugings = RFXcom, ActiveBackup, Applied Digital Ocelot, BLDeviceMatrix, BLGarbage, BLLAN, Current Cost, Global Cache GC100,HSTouch Android, HSTouch Server, HSTouch Server Unlimited, NetCAM, PowerTrigger, SageWebcamXP, SqueezeBox, X10 CM11A/CM12U.
          Scripts =
          Various

          Comment


            #6
            After reinstall and restarting, the warning persist. But the device is now working again. Thanks.

            Comment

            Working...
            X