Fix the issue with the following steps:
- Install Visual studio C++ build tools
- Open the command prompt from VS C++ build tools
- cd to your working directory
- Run your problematic mix from git bash in the powersheel e.g mix deps.compile comeonin or anything.
- Done.
Sample of code:
C:\Program Files (x86)\Microsoft Visual C++ Build Tools>mix deps.compile bcrypt_
elixir
** (Mix) Could not find a Mix.Project, please ensure you are running Mix in a di
rectory with a mix.exs file
C:\Program Files (x86)\Microsoft Visual C++ Build Tools>cd ..
C:\Program Files (x86)>cd ..
C:\>cd c:\wamp\www\mysite
c:\wamp\www\mysite>mix deps.compile bcrypt_elixir
==> bcrypt_elixir
Microsoft (R) Program Maintenance Utility Version 14.00.24210.0
Copyright (C) Microsoft Corporation. All rights reserved.
del /Q /F priv
erl -eval "io:format(\"~s~n\", [lists:concat([\"ERTS_INCLUDE_PATH=\", co
de:root_dir(), \"/erts-\", erlang:system_info(version), \"/include\"])])" -s ini
t stop -noshell > Makefile.auto.win
nmake / /F Makefile.win priv\bcrypt_nif.dll
Microsoft (R) Program Maintenance Utility Version 14.00.24210.0
Copyright (C) Microsoft Corporation. All rights reserved.
if NOT EXIST "priv" mkdir "priv"
cl /O2 /EHsc /I"c_src" /I"c:/Program Files/erl9.0/erts-9.0/include" /LD
/MD /Fepriv\bcrypt_nif.dll c_src\bcrypt_nif.c c_src\blowfish.c
Microsoft (R) C/C++ Optimizing Compiler Version 19.00.24210 for x64
Copyright (C) Microsoft Corporation. All rights reserved.
bcrypt_nif.c
blowfish.c
Generating Code...
Microsoft (R) Incremental Linker Version 14.00.24210.0
Copyright (C) Microsoft Corporation. All rights reserved.
/dll
/implib:priv\bcrypt_nif.lib
/out:priv\bcrypt_nif.dll
bcrypt_nif.obj
blowfish.obj
Creating library priv\bcrypt_nif.lib and object priv\bcrypt_nif.exp
Compiling 5 files (.ex)
Generated bcrypt_elixir app
c:\wamp\www\mysite>