Skip to content

Problems building #3

@sebastian-davidson

Description

@sebastian-davidson

I tried compiling this program at first just by running make. The Makefile failed to compile it, because GCC said there was a problem in the HOST macro:

<command-line>: error: ‘compiled’ undeclared here (not in a function)
version.c:3:12: note: in expansion of macro ‘HOST’
    3 | char *host=HOST;
      |            ^~~~
<command-line>: error: expected ‘,’ or ‘;’ before ‘:’ token
version.c:3:12: note: in expansion of macro ‘HOST’
    3 | char *host=HOST;
      |            ^~~~
<command-line>: error: stray ‘\’ in program
version.c:3:12: note: in expansion of macro ‘HOST’
    3 | char *host=HOST;
      |            ^~~~
<command-line>: error: stray ‘\’ in program
version.c:3:12: note: in expansion of macro ‘HOST’
    3 | char *host=HOST;
      |            ^~~~

I changed the flag to -DHOST="\"$(shell cat .host)\"" instead, and then that error went away. So, I tried again.

However, then I ran into a long list of linker errors (which I won't list unless you ask), entirely consisting of multiple definitions of global variables: hd, tl, files, current_file, tag, buf, and commandmode.

Am I doing something wrong when compiling, or does this program need to be updated so as not to have multiple definitions?

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