`

windows下使用IntelliJ IDEA的erlang编译环境搭建(含rebar工具)

 
阅读更多

一、安装Cygwin(windows下的UNIX模拟环境)
安装地址:https://cygwin.com/install.html
所需Cygwin包(是需求选择):
wget
openssh
make
vim
curl
binutils
git
inetutils等

二、安装erlang
http://www.erlang.org/download.html
配置erlang系统环境path,我的是F:\erlang\erl6.3\bin

三、安装rebar(挺好用的编译工具)
https://github.com/basho/rebar
Cygwin指令如下:
$ git clone git://github.com/rebar/rebar.git
$ cd rebar
$ ./bootstrap
Recompile: src/getopt
...
Recompile: src/rebar_utils
==> rebar (compile)
Congratulations! You now have a self-contained script called "rebar" in
your current working directory. Place this script anywhere in your path
and you can use rebar to build OTP-compliant apps.

四、安装IntelliJ IDEA
https://www.jetbrains.com/idea/download/
装好后配置erlang工具
1、安装erlang插件:打开File-Settings(Ctrl+Alt+s),找到Plugins,点击右边“Browse repositories...”按钮,在搜索框键入erlang,出现Erlang 的plugin,安装,网络问题下载失败可多试试或选用代理。

2、配置erlangSDK,打开File-Project Structure,点击SDKs项,点中间栏上面的绿色+号,把你的erlang加进去,我的是F:\erlang\erl6.3;在Project Setting里点Project,加入刚加入的sdk,点OK后系统会花一段时间建sdk索引,这样erlang的库就可以用了。
参考网址:http://94it.net/a/jingxuanboke/2014/0905/398840.html

3、配置rebar工具:在file-Settings里面找到Erlang External Tools,我的在other settings下面,将rebar加入进去,我的path为:F:\Cygwin\home\Administrator\rebar\rebar.cmd;在Run-edit configuration下点绿色+号添加erlang rebar ,然后就可以在运行按钮旁的下拉菜单选取运行rebar。

4、配置erlang shell:Run-edit configuration下点绿色+号添加
Erlang Console,配置有效的工作路径,不限,然后就跟rebar一样,可以运行erlang shell了。

这样就可以开工了!

分享到:
评论

相关推荐

Global site tag (gtag.js) - Google Analytics