Compile error

Forums Forum Compile error

This topic contains 4 replies, has 2 voices, and was last updated by  Martyn 1 month, 3 weeks ago.

Viewing 5 posts - 1 through 5 (of 5 total)
  • Author
    Posts
  • #2408 Reply

    Mark

    Hi Martyn,

    My parts have all finally arrived and I’m starting to build. It’s been a couple of years since I programmed Arduinos (4 actually). I installed the 1.6.3 IDE, downloaded your sketch and the required lib etc.

    When I try to compile I get an error

    parseNewdata.ino: In function ‘void parseNewData()':
    parseNewdata.ino:63:37: error: invalid conversion from ‘const char*’ to ‘char’ [-fpermissive]
    Error compiling.

    The line says
    receivedChars[0] = “”;

    That looks fine to me – right kind of quotes anyways.

    Any idea?

    Thanks!

    #2409 Reply

    Mark

    Actually I think I solved it.

    You were assigning receivedChars[0] to null as ‘slash 0′

    I changed it to read

    receivedChars[0] = 0;

    and it now compiles.

    I haven’t run it yet as I’ve yet to build but I think that should be fine, no?

    #2411 Reply

    Martyn
    Keymaster

    What version of the IDE are you using?
    I think this comes up with the newer IDEs.

    #2412 Reply

    Mark

    I installed 1.6.3 because that’s what you said you used – I figured it would make life easier.

    Also because my nano is an older one – the longer board with the larger chip and the 12v power supply jack. I figured I’d have a better chance of the older IDE working with an older nano.

    #2413 Reply

    Martyn
    Keymaster

    Hi Mark,

    thanks for reporting back.

    This has been reported before but I couldn’t duplicate the issue so assumed it was a change in the compiler or compiler settings with newer IDEs.

    Just thought it may actually be the wrong kind of quotes. Maybe it needs single quotes but a zero should work fine.

Viewing 5 posts - 1 through 5 (of 5 total)
Reply To: Compile error
Your information: