Chapter 2 of the moblin unofficial tutorial series-Section 3-integrated development environment

Source: Internet
Author: User

Chapter 2 of the moblin unofficial tutorial series-Section 3-integrated development environment

Author: Xu Cheng

If you need to reprint it, please indicate the source.

 

An integrated development environment is a collection of multiple tools used in development, including at least a text editor, compiler, and debugger. C language programs are developed in Linux and moblin systems. Eclipse is the most convenient integrated development environment. In fact, eclipse does not have compilation and debugging functions. These functions are implemented by calling GCC and GDB. You can also use the Intel C ++ compiler, this idea represents the idea of open-source system design.

1. Installation

Eclipse is developed using the Java language. Therefore, you must install the Java Runtime Environment JRE. Run the following command to install JRE on fedora:

# Yum install JRE

For the moblin system, you must download the Java Runtime Environment installation package from the website of sun. For. Decompress the JRE installation package in the moblin system and run the installation file.

You can run the following command to install Eclipse:

# Yum install eclipse-CDT

The moblin system needs to download the Eclipse IDE for C/C ++ developers installation package from the official website at "www.eclipse.org ". Download and decompress the package to a directory with executable permissions.

After installation, you can start the integrated development environment by running the eclipse executable file. You need to set the eclipse working directory at the first startup to save the development project.

2. Create a project

A project is the management unit of eclipse. Each group of source code files or other resource files is called a project and stored in the same directory. Each project can generate only one executable file. Select the file | new | C Project command, and enter the relevant project name to create a new project.

3. Compile and run the project

The "Hello World" project is provided in the project creation dialog box. You can create the project first and then compile the project. Press Ctrl + B to compile the project. If the compilation is successful, click the run button or select the run menu command to run the program. The running result of the program is displayed in the console view at the bottom of the screen.

4. Debugging

For compiled projects, select Run | debug for debugging, as shown in Figure 2.5.

Figure 2.5 eclipse debugging page

 

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.