'cl.exe' is not recognized as an internal or external command

Hi there,

I am trying to set up a simple Elixir project on Windows 10 with the following dependencies:

  • sqlite_ecto
  • ecto

My mix.esx:

defmodule Test.Mixfile do
  use Mix.Project

  def project do
    [app: :test,
     version: "0.1.0",
     elixir: "~> 1.4",
     build_embedded: Mix.env == :prod,
     start_permanent: Mix.env == :prod,
     deps: deps()]

  def application do
    [applications: [:logger, :sqlite_ecto, :ecto],
     mod: {test.Api, []}]

  defp deps do
    [{:ecto, "~> 1.1.5"}, 
     {:sqlite_ecto, "~> 1.0.0"}]

While running mix ecto.gen.repo Test.Repo I get the following error:

    ==> esqlite (compile)
    Compiled src/esqlite3_nif.erl
    Compiled src/esqlite3.erl
    Compiling c_src/esqlite3_nif.c
    'cl.exe' is not recognized as an internal or external command,
    operable program or batch file.
    ERROR: compile failed while processing c:/Projects/fp/octo/deps/esqlite: rebar_abort

What is causing this error? I already did a Visual Studio reinstall, but without any result.

According to a post on SO you need to modify your installation of MSVS to include C++.

choco install VisualCppBuildTools