Welcome to Vifm Q&A, where you can ask questions about Vifm usage. Registration is optional, anonymous posts are moderated. GitHub or Google logins are enabled.
0 votes
in vifm by

I tried to build Vifm by two different ways from this page (https://wiki.vifm.info/index.php/Obtaining_Vifm). But I am failed.

1) Using MXE (on GNU/Linux)
During building MXE toolchains I got errors about no rules for "mingwrt" and "w32api" targets.

I built MXE without these targets and when I tried to build Vifm I got errors about absent "ws2_32" and "netapi"

2) Using MinGW
I prepared full environment for building: downloaded mingw from the link, downloaded, patched and built PDCurses, downloaded pthreads and regex.

But when I tried to build Vifm I got error:

In file included from cmd_completion.c:30:
compat/dtype.h:27:2: error: expected identifier before '(' token
  DT_BLK,
  ^~~~~~
cmd_completion.c: In function 'complete_highlight_groups':
cmd_completion.c:639:6: warning: implicit declaration of function 'strncasecmp' [-Wimplicit-function-declaration]
   if(strncasecmp(str, expr, len) == 0)
      ^~~~~~~~~~~
Makefile.win:147: recipe for target 'cmd_completion.o' failed
mingw32-make: *** [cmd_completion.o] Error 1

Could you help me to fix one of these way to build Vifm for Windows? Or could you give me one more way or some advice how to do it?

1 Answer

0 votes
by
edited by

1) Looks like those packages are gone by now, I'm actually using MXE at some commits from 2015, need to update it. You can try changing Makefile.win from:

LIBS := -lregex -lnetapi32 -lws2_32 -lm

to

LIBS := -lregex -lm

at line #25.

2) Don't remember getting such errors on MinGW and I seem to be using the latest 8.1.0 version with gcc --version saying:

gcc (i686-posix-dwarf-rev0, Built by MinGW-W64 project) 8.1.0

Update (17.07.2020)

I just pulled the current version of MXE and built it without mingwrt and w32api packages. The two libraries (ws2_32 and netapi) exist and I have no trouble building Vifm.

If you would like to make a bug report or feature request consider using GitHub, SourceForge or e-mail. Posting such things here is acceptable, but this is not a perfect place for them.
...