Build the development environment of ipvsec ++ in Linux

Source: Internet
Author: User

The development of the new project team used Firefly, a less useful version control tool, which is quite well integrated with eclipse. Simply studying how to build the eclipse CDT environment in Linux is actually quite simple. It is summarized as follows for your reference.

 

Environment: rhel5.5 64bit (note that I am using a 64-bit system. Select the appropriate software for 32-bit systems)

Development Environment: Eclipse, CDT, java1.7

 

1. Download

1. Java

Http://www.oracle.com/technetwork/java/javase/downloads/jdk-7u1-download-513651.html

I downloaded jdk-7u1-linux-x64.rpm, 32-bit please download jdk-7u1-linux-i586.rpm

Skip this step if you have other Java versions.

2. Eclipse integrated CDT Environment

Http://www.eclipse.org/downloads/packages/eclipse-ide-cc-developers-includes-incubating-components/indigosr1

Bytes

Upload the downloaded file to/usr/local.

Ii. Install JDK

1. Enter the file directory

/Root # cd/usr/local

2. Install JDK

/Usr/local # rpm-IVH jdk-7u1-linux-x64.rpm

3. Configure Environment Variables

/Root # vi/etc/profile

Add the following configuration at the end of the file:

# Set Java environment

Java_home =/usr/Java/jdk1.7.0 _ 01

Classpath =.: $ java_home/lib/dt. jar: $ java_home/lib/tools. Jar

Path = $ java_home/bin: $ path

Export java_home classpath path

4. Restart the terminal for verification

/Root # Java-version

If the following information is displayed, the Java environment is successfully installed.

Java version "1.7.0 _ 01"

Java (TM) se Runtime Environment (build 1.7.0 _ 01-b08)

Java hotspot (TM) 64-bit server VM (build 21.1-b02, mixed mode)

3. Configure eclipse

1. Extract

/Usr/local # tar-zxvf eclipse-cpp-indigo-SR1-incubation-linux-gtk-x86_64.tar.gz

 

2. Add a desktop shortcut

/Usr/bin # Touch eclipse

/Usr/bin # chmod 755 eclipse

/Usr/bin # Vim eclipse

Add the following content:

#! /Bin/sh
# Export illa_five_home = "/usr/lib/Mozilla /"
Export eclipse_home = "/usr/local/Eclipse"
$ Eclipse_home/eclipse $ *

 

/Usr/bin # Vim/usr/share/applications/eclipse. Desktop

Add the following content:

[Desktop entry]
Encoding = UTF-8
Name = eclipse
Comment = Eclipse IDE
Exec = eclipse
Icon =/usr/local/Eclipse/icon. XPM
Terminal = false
Type = Application
Categories = gnome; application; development;
Startupnotify = true

 

In this caseProgram-> In programming, an eclipse icon is added. Right-click and choose "add this starter to the desktop". An eclipse icon is added to the desktop, you can double-click this icon to start eclipse.

 

4. helloworld

1. Create a project

Click File> New> C ++ project.

Enter helloworld in project name, select Hello World C ++ project in project type, and click "finish ".

2. Run

Right-click the project and choose build project. After compilation, right-click the project and choose run as> Local C ++ application. "!" Is displayed in the console below "!!! Hello world !!!"

3. Debug

Double-click the statement you want to debug to break the breakpoint. Right-click the project and choose debug as> Local C ++ application to go To the debug mode for debugging.

4. Notes

You can also select the run menu in the menu bar, or select Run As and debug as in the toolbar. For colleagues with some development experience, this should not be difficult.

 

After the default eclipse font is used up, spaces will be garbled, so the braces look uncomfortable. Adjusting the font can solve this problem.

Window-> preferences-> General-> appearance-> color and font select C ++-> Editor-> C/C ++ editor text font on the right, and click Edit, select the dejavu sans mono font. Solve the problem.

 

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.