ndreynolds / ex_termbox

Low-level termbox bindings for Elixir
MIT License
55 stars 14 forks source link

Build fails [Windows 10] #5

Open FatigueDev opened 2 years ago

FatigueDev commented 2 years ago

Specs:

Reproduction Steps:

Expected output: Success

Actual output:

==> ex_termbox

Microsoft (R) Program Maintenance Utility Version 14.00.24245.0
Copyright (C) Microsoft Corporation.  All rights reserved.

NMAKE : fatal error U1052: file 'Makefile.win' not found
Stop.
could not compile dependency :ex_termbox, "mix compile" failed. You can recompile this dependency with "mix deps.compile ex_termbox", update it with "mix deps.update ex_termbox" or clean it with "mix deps.clean ex_termbox"
==> terminal_game
** (Mix) Could not compile with "nmake" (exit status: 2).
One option is to install a recent version of
[Visual C++ Build Tools](https://visualstudio.microsoft.com/visual-cpp-build-tools/)
either manually or using [Chocolatey](https://chocolatey.org/) -
`choco install VisualCppBuildTools`.

After installing Visual C++ Build Tools, look in the "Program Files (x86)"
directory and search for "Microsoft Visual Studio". Note down the full path
of the folder with the highest version number. Open the "run" command and
type in the following command (make sure that the path and version number
are correct):

    cmd /K "C:\Program Files (x86)\Microsoft Visual Studio 14.0\VC\vcvarsall.bat" amd64

This should open up a command prompt with the necessary environment variables
set, and from which you will be able to run the "mix compile", "mix deps.compile",
and "mix test" commands.
FatigueDev commented 2 years ago

Important to note that I have installed the Visual C++ Build Tools. I just really want to know if this is an issue that can be replicated because I've not run into it in Elixir before; other packages install no problem and I'd love to get my hands on Ratatouille to tinker.

ndreynolds commented 2 years ago

Hmm, I've never actually tested this on Windows. I think there may be some obstacles to getting the library working there. Support in termbox seems unclear (https://github.com/nsf/termbox/issues/65).

The build here seems to be failing pretty early on—from what I can tell elixir_make is invoking make via nmake, and that's looking for a Makefile.win (which I haven't defined).

Could you try building in the Linux sub system or a Linux VM?

I think a Windows-friendly backend for Ratatouille would be a good long-term solution.

FatigueDev commented 2 years ago

Confirmed to function on Windows Subsystem for Linux. Running Ubuntu latest.

Requirements (I had to apt-get these):

Once those are installed, you don't seem to run into any issues with compiling termbox. I'm unsure how to proceed with actually porting this to windows however, since a lot of this tooling just doesn't function or has issues on Windows.