-
Notifications
You must be signed in to change notification settings - Fork 65
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.
We recommend downloading Erlang from erlang solutions, as the version of Erlang in the Ubuntu repositories is usually quite old.
Make sure you have the build-essential
package installed. Also erlang-dev
may be needed if you have installed Erlang from the Ubuntu repositories.
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
There are two 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.