Skip to content

[BUG] Apps program name cannot include "-" #19447

Description

@acassis

Description / Steps to reproduce the issue

If we rename hello to hello-world:
Image

the build will fail:

In file included from builtin_list.c:34:
builtin_proto.h:6:10: error: expected ‘=’, ‘,’, ‘;’, ‘asm’ or ‘__attribute__’ before ‘-’ token
    6 | int hello-world_main(int argc, char *argv[]);
      |          ^
In file included from builtin_list.c:50:
builtin_list.h:6:29: error: ‘hello’ undeclared here (not in a function)
    6 | { "hello-world", 100, 2048, hello-world_main },
      |                             ^~~~~
builtin_list.h:6:35: error: ‘world_main’ undeclared here (not in a function); did you mean ‘dd_main’?
    6 | { "hello-world", 100, 2048, hello-world_main },
      |                                   ^~~~~~~~~~
      |                                   dd_main
make[2]: *** [/home/alan/nuttxspace/apps/Application.mk:239: builtin_list.c.home.alan.nuttxspace.apps.builtin.o] Error 1
make[2]: *** Waiting for unfinished jobs....
<command-line>: error: expected ‘=’, ‘,’, ‘;’, ‘asm’ or ‘__attribute__’ before ‘-’ token
hello_main.c:38:5: note: in expansion of macro ‘main’
   38 | int main(int argc, FAR char *argv[])
      |     ^~~~

On which OS does this issue occur?

[OS: Linux]

What is the version of your OS?

Ubuntu 24.04

NuttX Version

mainline

Issue Architecture

[Arch: all]

Issue Area

[Area: Other]

Host information

No response

Verification

  • I have verified before submitting the report.

Metadata

Metadata

Assignees

No one assigned

    Labels

    Arch: allIssues that apply to all architecturesOS: LinuxIssues related to Linux (building system, etc)Type: BugSomething isn't working

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions