Skip to content

MSYS2 compilation #27

@lxhom

Description

@lxhom

Hey there, just wanted to let you know that you can indeed run Neo on native Windows with MSYS2 by adding #define _GNU_SOURCE to src/neo.cpp. I got this error first:

neo.cpp: In function ‘void ParseArgs(int, char**, Cloud*, double*, bool*)’:
neo.cpp:515:17: error: ‘strcasecmp’ was not declared in this scope; did you mean ‘strncmp’?
  515 |             if (strcasecmp(optarg, "ascii") == 0) {
      |                 ^~~~~~~~~~
      |                 strncmp
neo.cpp:575:17: error: ‘strcasecmp’ was not declared in this scope; did you mean ‘strncmp’?
  575 |             if (strcasecmp(optarg, "green") == 0) {
      |                 ^~~~~~~~~~
      |                 strncmp
neo.cpp: In function ‘int main(int, char**)’:
neo.cpp:827:16: error: ‘strcasestr’ was not declared in this scope; did you mean ‘strstr’?
  827 |     if (loc && strcasestr(loc, "UTF") != nullptr)
      |                ^~~~~~~~~~
      |                strstr
make[1]: *** [Makefile:371: neo.o] Error 1

But after googling a bit, I came across this: jarun/nnn#784, and I just tried putting #define _GNU_SOURCE into the source file. Maybe including something like jarun/nnn@d38f4b1 could fix this properly, but I don't know exactly if/what that would break. You can add to the readme that it is possible that way :)

image

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