zoukankan      html  css  js  c++  java
  • ubuntu系统安装eclipse

    许久没有学linux,突然久违的热情有来临了,想想还是从最容易入手的ubuntu开始学吧,花费了点时间重复了以前的那些动作在vmware-worksation中安装了ubuntu10。貌似听说eclipse是linux中一个不错的开发软件。于是在网上看了一下安装教程,就学着装起来了。

    ubuntu的安装少了其他linux版本的的很多繁琐的事情。。。。。(下面一大段来源于http://hi.baidu.com/dazzae/blog/item/ab2770118d8ce4cda6ef3f0d.html%20

    sudo apt-get install eclipse
    sudo apt-get install eclipse-pde
    sudo apt-get install eclipse-jdt 启动eclipse,
    选择Help->Install New Software...,添加软件源http://download.eclipse.org/releases/galileo
    选择Collaboration->Mylyn Bridge: C/C++ Development,安装,重启eclipse。
    同上述两步,选择Programming Languages->Eclipse C/C++ Development,都选上吧,现在硬盘不贵的。重启eclipse,试试吧,有tutorial的。
    注:在安装Mylyn Bridge: C/C++ Development,如果直接选择安装Eclipse C/C++ Development,会出现如下错误:
    Cannot complete the install because one or more required items could not be found.
    Software being installed: Mylyn Bridge: C/C++ Development 5.1.0.200909110608 (org.eclipse.cdt.mylyn.feature.group 5.1.0.200909110608)
    Missing requirement: Mylyn Bridge: C/C++ Development 5.1.0.200909110608   (org.eclipse.cdt.mylyn.feature.group 5.1.0.200909110608) requires 'org.eclipse.mylyn.context.core 3.0.0' but it could not be found

    下面是我自己测试时的一些问题咯:

    安装好了eclipse下面要做一下c++的测试,下面是几个要注意的细节。我测试的程序是 

    #include<iostream>

    int main()

    {

    std::cout<<"welcome to ubuntu!";

    return 0;

    }

    说明:创建源文件时名称后面自己加后缀cpp咯。

           nux中的gcc或者g++要求一定要有返回值,不写的话默认为int,所以测试时要注意最好加上返回值类型了。

            这个不支持<iostream.h>和<iostream> using namespace std;这两种,所以多写一下std咯。

            注意主函数是int main(),我记得我没写错,但是好几次仔细一看都是int mian().不知道我写错还是编辑器的问题。既然有这个问题出现也顺便说一下咯。

            运行之前肯定得编译了,但是还有一点是在和windows的软件不一样的是编译之前一定要保存咯。要不会出现错误(launch failed. Binary file not found)

  • 相关阅读:
    认识计算机
    Sum 类型题目总结
    3Sum Smaller 解答
    3Sum Closest 解答
    Roman to Integer && Integer to Roman 解答
    Longest Common Prefix 解答
    Shortest Word Distance 解答
    Longest Valid Parentheses 解答
    Lowest Common Ancestor of a Binary Search Tree 解答
    Longest Palindromic Substring 解答
  • 原文地址:https://www.cnblogs.com/yuerdongni/p/2200718.html
Copyright © 2011-2022 走看看