-
Notifications
You must be signed in to change notification settings - Fork 66
Requirements
Elixir version 1.2 or later and Erlang/OTP version 18.0 or later.
You also need to have a C compiler, such as gcc, installed. For more information about installing the C dependencies, please read the directions below for the operating system you are using.
You will need to install the C compiler and development tools. It is easier to install these tools as a group, but if you want to install them individually, you will need to install gcc
, make
and glibc
(libc6-dev
on Ubuntu / Debian).
We recommend downloading Erlang from erlang solutions, as the version of Erlang in the Ubuntu repositories is usually quite old.
If you install Erlang from the Ubuntu repositories, you will need to install erlang-dev
as well.
To install the C compilation tools:
sudo apt-get install build-essential
To install the C compilation tools:
dnf group install 'Development Tools'
You need to have gcc and make installed. Try running the commands gcc --version
and / or make --version
. If these programs are not installed, you will be prompted to install them.
If you are using El Capitan
, you also need to deactivate the new rootless mode by running the following commands:
sudo nvram boot-args="rootless=0"; osascript -e 'tell app "loginwindow" to «event aevtrrst»'
sudo ln -s /usr/bin/gcc /usr/bin/gcc-4.2
The easiest option is to install a recent version of
Visual C++ Build Tools
either manually or using Chocolatey -
choco install VisualCppBuildTools
.
After installing Visual C++ Build Tools, look in the Program Files (x86)
folder 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 commands mix compile
, mix deps.compile
and mix test
.
If the above method does not work, there are two other options, both of which use Visual Studio.
The first, and most straightforward, option:
-
Install a recent version of Visual Studio (you can download the community edition for free). When you install Visual Studio, make sure you also install the C / C++ tools.
-
After installing VS, look in the
Program Files (x86)
folder and search forMicrosoft 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 commands
mix compile
,mix deps.compile
andmix test
. -
Once you know that the above command works, you can create a shortcut for it so that it is easy to open in the future.
This second option is if you want to develop in Visual Studio:
- After installing Visual Studio, go to File > New > Project.
- Choose C++, it will prompt to install the module.
- Close and restart Visual Studio.
- Go to search > "Developer Command Prompt for VS2015".
- cd to the VC directory, run
vcvarsall.bat amd64
-- this must be run every time you open a new Command Prompt. - cd to your project and run
mix deps.get
, and thenmix deps.compile
.
See: https://msdn.microsoft.com/en-us/library/f2ccy3wt.aspx for more details about setting the environment variables.
See: https://msdn.microsoft.com/en-us/library/60k1461a.aspx for more details about C / C++ support in Visual Studio 2015.