Skip to content

Compile in Arduino IDE 2.3.4 fails #1

Description

@Stefan4731

I'm new on Github, don't know if this is the correct place to leave a comment. Please forgive me if I'm wrong here and let me know where else I should send this.

I installed Clip 0.1.0 with Arduinos library manager, then I copied BasicCLI.ino, cli.c, sli.h from github in a new directory D:\BasicCLI. When I compile it with Arduino IDE 2.3.4 (CRTL-R) I get these errors:

D:\BasicCLI\cli.c:34:3: error: called object is not a function or function pointer
   34 |   CLIP_DEF_COMMAND_END_WITH_ARGS()
      |   ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
In file included from d:\sk008\Entwicklung\ESP32-C3\libraries\Clip\src/clip.h:34,
                 from D:\BasicCLI\cli.h:27,
                 from D:\BasicCLI\cli.c:25:
d:\sk008\Entwicklung\ESP32-C3\libraries\Clip\src/clip_defs.h:54:2: error: expected '}' before ';' token
   54 | };\
      |  ^~
   55 | 
      |   
D:\BasicCLI\cli.c:35:1: note: in expansion of macro 'CLIP_DEF_ROOT_COMMAND_END'
   35 | CLIP_DEF_ROOT_COMMAND_END()
      | ^~~~~~~~~~~~~~~~~~~~~~~~~
d:\sk008\Entwicklung\ESP32-C3\libraries\Clip\src/clip_defs.h:36:66: note: to match this '{'
   36 |     .args = (const struct clip_arg**)&(const struct clip_arg*[]) {\
      |                                                                  ^~
   37 | 
      |                                                                   
d:\sk008\Entwicklung\ESP32-C3\libraries\Clip\src/clip_defs.h:79:9: note: in expansion of macro '_CLIP_DEF_ARGUMENTS'
   79 |         _CLIP_DEF_ARGUMENTS()\
      |         ^~~~~~~~~~~~~~~~~~~
D:\BasicCLI\cli.c:28:67: note: in expansion of macro 'CLIP_DEF_WITH_ARGS'
   28 |   CLIP_DEF_COMMAND("get", "get pin state", cli_gpio_get_callback) CLIP_DEF_WITH_ARGS()
      |                                                                   ^~~~~~~~~~~~~~~~~~
D:\BasicCLI\BasicCLI.ino: In function 'void read_line(void (*)(char*))':
D:\BasicCLI\BasicCLI.ino:198:31: error: invalid conversion from 'const char*' to 'char*' [-fpermissive]
  198 |         on_read_line(buf.c_str());
      |                      ~~~~~~~~~^~
      |                               |
      |                               const char*

exit status 1

Compilation error: called object is not a function or function pointer

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions