网上有人说:

在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. yii2和laravel比较

    yii2和laravel比较 一.总结 一句话总结: 开发速度两者相当:laravel的artisan工具和yii的gii有异曲同工的效果,借助于artisan工具,可以快速创建控制器.模型和路由等. ...

  2. MAC使用命令行打包出ipa包-通过xcodeproj

    参考 : https://www.jianshu.com/p/32af2f71b4e5--老了,里面的一些命令现在都没有了,但可以借鉴思路 https://www.jianshu.com/p/004c ...

  3. Linux随笔 - linux 多个会话同时执行命令后history记录不全的解决方案【转载】

    基本认识linux默认配置是当打开一个shell终端后,执行的所有命令均不会写入到~/.bash_history文件中,只有当前用户退出后才会写入,这期间发生的所有命令其它终端是感知不到的. 问题场景 ...

  4. 测开之路三十:Flask基础之jinja2模板继承

    实现某些位置的内容固定,某些位置的内容动态展示,如: 中文文档地址:http://docs.jinkan.org/docs/jinja2/templates.html#template-inherit ...

  5. 使用Python的PIL模块来进行图片对比

    使用Python的PIL模块来进行图片对比 在使用google或者baidu搜图的时候会发现有一个图片颜色选项,感觉非常有意思,有人可能会想这肯定是人为的去划分的,呵呵,有这种可能,但是估计人会累死, ...

  6. 面试题:Nginx负载均衡的算法怎么实现的?为什么要做动静分离?

    面试题 Nginx负载均衡的算法怎么实现的?Nginx 有哪些负载均衡策略?Nginx为什么要做动静分离? 面试官心理剖析 主要是看应聘人员对Nginx的基本原理是否熟悉,需要应聘人员能够根据实际业务 ...

  7. Red Hat 6网络配置笔记

    1.重启网卡/etc/init.d/network restart server network restart2.运行结果报错 关闭NetworkManagerservice NetworkMana ...

  8. Gcd的原理理解

    Ps:最小公倍数=a*b/gcd(a,b) a除以b的商为p,余数为q,a=b*p+q,gcd(b,q)可以整除a和b,因此gcd(b,q)也能整除gcd(a,b):反过来,gcd(a,b)也能整除g ...

  9. js-xlsx sheet_to_json 读取小数位数变多

    read as string . 例如:2.85 读取后变成 2.84999999999999999 这种. 以字符串形式读取. XLSX.utils.sheet_to_json(workbook.S ...

  10. latex 查找缺失的库文件

    app-portage/pfl contains a program to search in an online database for a Gentoo package containing a ...