Before you start you need a Mingw-w64 toolchain for Linux, try installing the mingw-w64 package (Ubuntu, Suse, Fedora?) or get it from the Mingw-w64 website.
$ mkdir deps-mingw
$ cd deps-mingw
$ cmake -DCMAKE_TOOLCHAIN_FILE=../cmake/mingw32-w64-cross-travis.toolchain.cmake ../third-party/
$ make
$ cd ..
$ mkdir build-mingw
$ cd build-mingw
$ cmake -DCMAKE_TOOLCHAIN_FILE=../cmake/mingw32-w64-cross-travis.toolchain.cmake -DCMAKE_BUILD_TYPE=Debug -DCMAKE_C_FLAGS="-DMIN_LOG_LEVEL=0 -pg" -DDEPS_PREFIX=../deps-mingw/usr ..
$ make
$ wine bin/nvim.exe
You may get some errors (like missing dlls) when running, but this depends on your Mingw toolchain. Just copy the missing dll into the bin/ folder.
FYI: the terminal interface IS broken, so there wont be any output - but you can use one of the Neovim GUIs
$ wine /usr/i686-w64-mingw32/sys-root/mingw/bin/gdbserver.exe :0 bin/nvim.exe
Process bin/nvim.exe created; pid = 36
Listening on port 47612
or alternatively
$ winedbg --gdb --no-start bin/nvim.exe
And them connect to gdbserver
$ gdb bin/nvim.exe
GNU gdb (GDB; openSUSE 13.1) 7.6.50.20130731-cvs
(...)
(gdb) target remote localhost:47612
Remote debugging using localhost:47612
warning: Could not load shared library symbols for 12 libraries, e.g. C:\windows\system32\kernel32.dll.
Use the "info sharedlibrary" command to see the complete listing.
Do you need "set solib-search-path" or "set sysroot"?
0x7b862737 in ?? ()
from here on out, it is regular gdb, use continue (not run) to start executing.
- Windows system DLL symbols are not available
Linking fails, with an error finding -lrt, -ldl, -lnsl - this seems to happen when an existing version of libuv is already installed (and the linking options are picked up from pkg-config). It is not clear why pkg-config is being used for the cross compile though.
@GentleFly (I know, really late to the party, but couldn't help commenting anyway.)
You're missing
libuv
. You've got to install it first with your package manager.