网上有人说:

在eclipse下 windows-->Preference-->C/C++-->Build-->Setting然后选择Discovery标签,将里面的内容全部Reset。这样就没有错误了,当然前提是你安装了 build-essential 和 g++。

注:而我是安装了g++,然后对Discovery标签中的“CDT GCC Build-in Compiler Settings”,点击"Clear Entries", 然后编译代码时,就没有g++错误了。

我采用以下Ubuntu下gcc,g++等的安装方式:(转自:http://blog.csdn.net/wind00sky/article/details/4239749

  1. 主要来自ubuntu中文社区http://www.ubuntu.org.cn/support/documentation/doc/VMware
  2. 首选,确认你已经安装了build-essential程序包:
    apt-get install build-essential
  3. 确认你已经安装了内核头文件包:
    uname -r
    apt-get install linux-headers-'kernel version'
  4. 如果你遇到gcc版本错误,你需要安装编译你内核的gcc版本:(我是从此处开始往下进行安装g++的)
    cat /proc/version

    这会告诉你,你的内核是用什么版本的gcc编译的.

    $ cat /proc/version 
    Linux version 2.6.12-8-386 (buildd@rothera) (gcc version 3.4.5 20050809 (prerelease) (Debian 3.4.4-6ubuntu6)) #1 Tue Aug 30 22:41:30 BST 2005
    ls /usr/bin/gcc*

    /usr/bin/gcc      /usr/bin/gcc-4.0  /usr/bin/gccbug   /usr/bin/gccbug-4.0

    可以看到,我的核心是用gcc-3.4编译的,但我只装了gcc-4.0.如果你的也不同于/usr/bin/gcc*,你需要安装核心所用的版本.

    apt-get install gcc-3.4

    这是我需要的版本,你的可能不同.

  5. 人 们忘记的,并困扰我的是g++版本.一些人好像安装gcc之后就可以正常安装vmware-config.pl.但我的在编译vmmon模块时遇到 "cannot exec 'cc1plus'"错误并停止了.你需要安装的是和gcc一样版本的gcc-c++,只是Debian/Ubuntu把它叫做g++.
    apt-get install g++-3.4
  6. 编辑添加: 我忘记你要设定CC为需要的gcc版本了:
    export CC=/usr/bin/gcc-3.4
    ./runme.pl

eclipse run error:g++ not found in Path的更多相关文章

  1. “A configuration with this name already exists” error in eclipse run configurations

    “A configuration with this name already exists” error in eclipse run configurations Is there a way t ...

  2. The Linux Mint 17.1:Eclipse Run The C++ And Python Configoration

    p { margin-bottom: 0.1in; line-height: 120% } # Copyright (c) 2016, 付刘伟 (Liuwei Fu)# All rights rese ...

  3. 解决:An internal error occurred during: "Launching New_configuration". Path for project must have only one segment.

    问题: 点击运行时eclipse报错如下: An internal error occurred during: "Launching New_configuration". Pa ...

  4. eclipse Run On Server 异常:could not load the Tomcat Server configuration at Servers\tomcat V5.0 Sertomcat

    eclipse Run On Server 异常:could not load the Tomcat Server configuration at Servers\tomcat V5.0 Serto ...

  5. [Android] An internal error occurred during: "Launching New_configuration". Path for project must have only one segment.

    出错: An internal error occurred during: "Launching New_configuration". Path for project mus ...

  6. adt eclipse 配置问题 error:could not open ...jvm.cfg

    在安装adt eclipse后,打开eclipse提示error:could not open eclipse\jre\lib\amd64\jvm.cfg 据网上显示原因应该是以前安装过java,然后 ...

  7. iOS警告-Warning: Error creating LLDB target at path(模拟器警告)

    Warning: Error creating LLDB target at path '/Users/apple/Library/Developer/Xcode/DerivedData/Observ ...

  8. 追索权 Eclipse + NDK error: stray '\24' in program

    [size=16px][b][color=#FF0000]追索权 Eclipse + NDK  error: stray '\24' in program[/color][b][/b][/b][/si ...

  9. Eclipse创建maven工程后没有build path解决方案

    1.修改maven工程下的.project文件为如下内容 <?xml version="1.0" encoding="UTF-8"?> <pr ...

随机推荐

  1. Thrift报错:Error: Thrift compiler: Failed to translate files. Error: Cannot run program thrift error=2

    文章目录 报错: 原因: 解决: 报错: Error: Thrift compiler: Failed to translate files. Error: Cannot run program th ...

  2. How to show out three rows from the same databand On A4?

    How to show out three rows from the same databand On A4? Quote Post by DoraHuang » Tue Mar 13, 2018 ...

  3. ORM模型类介绍,

    所有的软件开发过程中,都会涉及到对象和关系型数据库,在用户层面和业务逻辑层面,程序员编写代码都是面向对象的,当我们对象的信息发生变化的时候,都需要将对应的信息,传到关系型数据库中.而在此之前,需要我们 ...

  4. Java并发AtomicLong接口

    java.util.concurrent.atomic.AtomicLong类提供了可以被原子地读取和写入的底层long值的操作,并且还包含高级原子操作. AtomicLong支持基础long类型变量 ...

  5. Liunx平台安装MySQL操作步骤

    使用yum安装MySQL 第一步 第二步 第三步 数据库安装成功 修改数据库密码,并且删除匿名用户.禁止root远程登录.删除test数据库.刷新权限. 使用命令进入后,找到自己的临时密码,并且修改 ...

  6. Fix invisible cursor issue in Ubuntu 13.10

    Fix invisible cursor issue in Ubuntu 13.10 Fixing this problem is rather too easy. Open a terminal ( ...

  7. 怎么避免从删库到跑路 -- 详解 mysql binlog 的配置与使用

    1. 引言 使用数据库的时候,我们每个操作都十分小心,尤其是不能直接在数据库上执行 update.delete 等操作,否则万一忘记加全 where 条件,可能就会造成无法挽回的结果. 有一句十分流行 ...

  8. vue中给请求来的数据List ,添加属性false 后,赋值不上问题解决办法

    data() { return { list:[ // 添加属性fale 后的值 ], // 测试数据 goList:[ { name:'张三', phone:'18621958665' }, { n ...

  9. C#log4net的使用

    一,下载log4net.dll,在项目中添加引用 二,在站点根目录添加,配置文件(log4net.xml), <file value="logs/logfile.txt"/& ...

  10. Codeforces The Child and Toy

    The Child and Toy time limit per test1 second On Children's Day, the child got a toy from Delayyy as ...