Build Erlang programming environment under Ubuntu

Source: Internet
Author: User

Build Erlang programming environment under Ubuntu-adu World-Blog channel-csdn.net

Spit Groove: Erlang as a small language, programming environment configuration of my crazy Ah, the official standard is Emacs, but I as poisoning has deep vimer really do not want to change the editor, on the way I tried to use Eclipse plug-in erlide, but, when I consumed a lot of character, After having endured a slow speed install, use it to write Erlang code and then run ... Then the card died: 10,000 grass mud horse tumbling ah.

Premise: Ubuntu and Vim use the basic proficiency (about Vim has also recently gained, feel finally can write some summary)

Steps:

1, install a variety of libraries; (refer to this article: Click to open the link)

[Plain]View Plaincopyprint?
    1. SUDO APT-GET INSTALL BUILD-ESSENTIAL    
    2. sudo apt-get install libncurses5-dev     
    3. SUDO APT-GET INSTALL LIBSSL-DEV  
    4. sudo apt-get install m4   
    5. SUDO APT-GET INSTALL UNIXODBC UNIXODBC-DEV  
    6. sudo apt-get install freeglut3-dev libwxgtk2.8-dev    
    7. SUDO APT-GET INSTALL XSLTPROC    
    8. sudo apt-get install fop   
    9. SUDO APT-GET INSTALL TK8.5  
sudo apt-get install build-essentialsudo apt-get install libncurses5-devsudo apt-get install Libssl-devsudo apt-get Insta ll m4sudo apt-get Install unixodbc unixodbc-devsudo apt-get install freeglut3-dev libwxgtk2.8-devsudo apt-get install XSLT Procsudo apt-get Install fopsudo apt-get Install tk8.5

2. Installing Erlang

There are two ways to do this:

(1) We go to the official Erlang website to download the source code, and then compile the installation yourself

[Plain]View Plaincopyprint?
    1. Tar zxvf/home/lqg/download/otp_src_r15b01.tar.gz
    2. cd/home/lqg/otp_src_r15b01/
    3. ./configure
    4. Make && make install
    Tar zxvf/home/lqg/download/otp_src_r15b01.tar.gz    cd/home/lqg/otp_src_r15b01/    ./configure make    && Make install  



(2) sudo apt-get install Erlang

Recommendation: The second case is suitable for the older version, however, for beginners, the latest version of how much use it? Quick Start is the last important thing, so I suggest you choose the method of (2)

3. Check if Erlang is installed.

In the terminal input erl, if there is a picture, you have installed, congratulations!!

4, install Vimerl plugin reference this article: Click to open the link

5, write a module, and then compile and run

Using VIM, create a new Hw.erl file and enter the following code:

[Plain]View Plaincopyprint?
    1. -module (HW).
    2. -export ([printhelloworld/0]).
    3. Printhelloworld ()
    4. Io:format ("Helloworld~n").
-module (HW).-export ([printhelloworld/0]). Printhelloworld (),        Io:format ("Helloworld~n").



6, Building Erlang has a tool is very powerful, it is the legendary rebar, about its introduction, you can refer to this article click to open the link

However, we have just touched Erlang, in the course of learning to use this word, it is not a bit overkill it? Of course, under Erlang, it gives us the compiler. And see how we do it:

(1) Open the shell terminal of Erlang

(2) input C (HW). then enter.

(3) Hw:printhelloworld (). Then enter

Congratulations, welcome to the world of Erlang.

Learning a small language, the right programming environment really let me break the heart. First of all thanks to the following bloggers, is your article to help me set up a first environment.

This article references: http://cryolite.iteye.com/blog/1143933;

http://blog.csdn.net/lqg1122/article/details/7434310

Http://dhq.me/build-compile-eunit-release-erlang-application-with-rebar

"Erlang Programming"

Build Erlang programming environment under Ubuntu

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.