Eclipse发生错误127 [英] Eclipse Make Error 127

查看:1540
本文介绍了Eclipse发生错误127的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

这是我第一次使用Eclipse,我第一次在linux环境中编程。所以我可能会发布一些半无用的信息,但我只是想给我可以有什么细节。



问题:我正在尝试建立一个项目,并收到以下错误和警告。



问题:做,和或获取,以便开始使用c ++在linux中,在IDE中?修正错误会很好,但上述是我的基本目标。



IDE信息

  Eclipse 
版本:Helios发行版
版本号:20100617-1415

操作系统信息

  Fedora 13: i686 

错误(1项)

  make:*** [src / xoorMath.o]错误127 xoorMath C / C ++ Problem 

警告(2项)

 启动外部扫描器信息生成器时出错(g ++ -E -P -v -dD /home/xoorath/workspace/.metadata/.plugins/org.eclipse.cdt.make.core/specs.cpp)xoorMath未知C / C ++ Problem 
启动外部扫描仪信息生成器时出错(g ++ -E -P -v -dD /home/xoorath/workspace/.metadata/.plugins/org.eclipse.cdt.make.core/specs.cpp)xoorMath未知C / C ++问题

源代码

  // ================================ ====================================== 
//名称: xoorMath.cpp
//作者:
//版本:
//版权所有:您的版权声明
//说明:C ++中的Hello World,Ansi风格
// ================================================ ==========================

#include< iostream>
using namespace std;

int main(){
cout<< !!!你好,世界!!! << endl; // prints !!! Hello World!

return 0;
}

生成的Makefile

  ################################# ############################################### 
#自动生成的文件。不要编辑!
############################################## #########################################

-include ../makefile.init

RM:= rm -rf

#所有参与构建的源都定义在这里
-include sources.mk
-include subdir .mk
-include src / subdir.mk
-include objects.mk

ifneq($(MAKECMDGOALS),clean)
ifneq($ C ++ _ DEPS)),)
-include $(C ++ _DEPS)
endif
ifneq($(strip $(C_DEPS)),)
-include $ C_DEPS)
endif
ifneq($(strip $(CC_DEPS)),)
-include $(CC_DEPS)
endif
ifneq )),)
-include $(CPP_DEPS)
endif
ifneq($(strip $(CXX_DEPS)),)
-include $(CXX_DEPS)
endif
ifneq($(strip $(C_UPPER_DEPS)),)
-include $(C_UPPER_DEPS)
endif
endif

-include ../makefile .defs

#将这些工具调用的输入和输出添加到构建变量

#所有目标
all:xoorMath

#工具调用
xoorMath:$(OBJS)$(USER_OBJS)
@echo'构建目标:$ @'
@echo'调用:GCC C ++链接器'
g ++ -o xoorMath$(OBJS)$(USER_OBJS)$(LIBS)
@echo'完成的目标:$ @'
@echo''

#其他目标
clean:
- $(RM)$(OBJS)$(C ++ _ DEPS)$(C_DEPS)$(CC_DEPS)$(CPP_DEPS)$(EXECUTABLES)$(CXX_DEPS)$(C_UPPER_DEPS)xoorMath
- @ echo''

.PHONY:所有干净的依赖项
.SECONDARY:

-include ../makefile.targets



EDIT
尝试运行'gcc -E -P -v -dD / home / xoorath / workspace / .metadata / .plugins / org.eclipse.cdt.make.core / specs.cpp'

  [root @ wt227-09-fedora xoorath]#gcc -E -P -v -dD /home/xoorath/workspace/.metadata/.plugins/org.eclipse.cdt.make.core/specs.cpp 
使用built - 规格。
目标:i686-redhat-linux
配置:../configure --prefix = / usr --mandir = / usr / share / man --infodir = / usr / share / with-bugurl = http://bugzilla.redhat.com/bugzilla --enable-bootstrap --enable-shared --enable-threads = posix --enable-checking = release --with-system-zlib --enable- __cxa_atexit --disable-libunwind-exceptions --enable-gnu-unique-object --enable-languages = c,c ++,objc,obj-c ++,java,fortran,ada --enable-java-awt = gtk --disable -dssi --with-java-home = / usr / lib / jvm / java-1.5.0-gcj-1.5.0.0 / jre --enable-libgcj-multifile --enable-java-maintainer-mode - ecj-jar = / usr / share / java / eclipse-ecj.jar --disable-libjava-multilib --with-ppl --with-cloog --with-tune = generic --with-arch = i686 --build = i686-redhat-linux
线程模型:posix
gcc版本4.4.4 20100630(Red Hat 4.4.4-10)(GCC)
COLLECT_GCC_OPTIONS =' - E''-P' '-v''-dD''-mtune = generic''-march = i686'
cc1plus -E -quiet -v -P -D_GNU_SOURCE /home/xoorath/workspace/.metadata/.plugins/org。 eclipse.cdt.make.core / specs.cpp -mtune = generic -march = i686 -dD
gcc:错误尝试执行'cc1plus':execvp:没有这样的文件或目录
[root @ wt227简单的解决方案真的很简单的解决方案。

原来我没有g ++。



我不得不进入控制台,并执行以下操作:

  yum install gcc-c ++ 


$ b b

这是它。


this is my first time using Eclipse, and my first time programming in a linux environment. So I might end up posting some semi-usless information, but I'm just trying to give what ever details I can.

The Issue: I'm trying to build a project, and I'm getting the following errors and warnings.

The Question: What would I have to do, and or get, in order to start working with c++ in linux, within an IDE? Fixing the error would be great, but the above stated is my underlying goal.

IDE Info:

Eclipse
Version: Helios Release
Build id: 20100617-1415

OS Info:

Fedora 13: i686

Errors(1 item)

make: *** [src/xoorMath.o] Error 127 xoorMath C/C++ Problem

Warnings(2 items)

Error launching external scanner info generator (g++ -E -P -v -dD /home/xoorath/workspace/.metadata/.plugins/org.eclipse.cdt.make.core/specs.cpp) xoorMath Unknown  C/C++ Problem
Error launching external scanner info generator (g++ -E -P -v -dD /home/xoorath/workspace/.metadata/.plugins/org.eclipse.cdt.make.core/specs.cpp) xoorMath Unknown  C/C++ Problem

Source Code

//============================================================================
// Name        : xoorMath.cpp
// Author      : 
// Version     :
// Copyright   : Your copyright notice
// Description : Hello World in C++, Ansi-style
//============================================================================

#include <iostream>
using namespace std;

int main() {
    cout << "!!!Hello World!!!" << endl; // prints !!!Hello World!!!

    return 0;
}

Generated Makefile

################################################################################
# Automatically-generated file. Do not edit!
################################################################################

-include ../makefile.init

RM := rm -rf

# All of the sources participating in the build are defined here
-include sources.mk
-include subdir.mk
-include src/subdir.mk
-include objects.mk

ifneq ($(MAKECMDGOALS),clean)
ifneq ($(strip $(C++_DEPS)),)
-include $(C++_DEPS)
endif
ifneq ($(strip $(C_DEPS)),)
-include $(C_DEPS)
endif
ifneq ($(strip $(CC_DEPS)),)
-include $(CC_DEPS)
endif
ifneq ($(strip $(CPP_DEPS)),)
-include $(CPP_DEPS)
endif
ifneq ($(strip $(CXX_DEPS)),)
-include $(CXX_DEPS)
endif
ifneq ($(strip $(C_UPPER_DEPS)),)
-include $(C_UPPER_DEPS)
endif
endif

-include ../makefile.defs

# Add inputs and outputs from these tool invocations to the build variables 

# All Target
all: xoorMath

# Tool invocations
xoorMath: $(OBJS) $(USER_OBJS)
    @echo 'Building target: $@'
    @echo 'Invoking: GCC C++ Linker'
    g++  -o"xoorMath" $(OBJS) $(USER_OBJS) $(LIBS)
    @echo 'Finished building target: $@'
    @echo ' '

# Other Targets
clean:
    -$(RM) $(OBJS)$(C++_DEPS)$(C_DEPS)$(CC_DEPS)$(CPP_DEPS)$(EXECUTABLES)$(CXX_DEPS)$(C_UPPER_DEPS) xoorMath
    -@echo ' '

.PHONY: all clean dependents
.SECONDARY:

-include ../makefile.targets

EDIT Tried running 'gcc -E -P -v -dD /home/xoorath/workspace/.metadata/.plugins/org.eclipse.cdt.make.core/specs.cpp'

[root@wt227-09-fedora xoorath]# gcc -E -P -v -dD /home/xoorath/workspace/.metadata/.plugins/org.eclipse.cdt.make.core/specs.cpp
Using built-in specs.
Target: i686-redhat-linux
Configured with: ../configure --prefix=/usr --mandir=/usr/share/man --infodir=/usr/share/info --with-bugurl=http://bugzilla.redhat.com/bugzilla --enable-bootstrap --enable-shared --enable-threads=posix --enable-checking=release --with-system-zlib --enable-__cxa_atexit --disable-libunwind-exceptions --enable-gnu-unique-object --enable-languages=c,c++,objc,obj-c++,java,fortran,ada --enable-java-awt=gtk --disable-dssi --with-java-home=/usr/lib/jvm/java-1.5.0-gcj-1.5.0.0/jre --enable-libgcj-multifile --enable-java-maintainer-mode --with-ecj-jar=/usr/share/java/eclipse-ecj.jar --disable-libjava-multilib --with-ppl --with-cloog --with-tune=generic --with-arch=i686 --build=i686-redhat-linux
Thread model: posix
gcc version 4.4.4 20100630 (Red Hat 4.4.4-10) (GCC) 
COLLECT_GCC_OPTIONS='-E' '-P' '-v' '-dD' '-mtune=generic' '-march=i686'
 cc1plus -E -quiet -v -P -D_GNU_SOURCE /home/xoorath/workspace/.metadata/.plugins/org.eclipse.cdt.make.core/specs.cpp -mtune=generic -march=i686 -dD
gcc: error trying to exec 'cc1plus': execvp: No such file or directory
[root@wt227-09-fedora xoorath]# 

解决方案

Simple solution really. Turns out I didn't have g++. I installed gcc, and perhapse somebody here knows the difference, if so feel free to enlighten me.

I had to go into the console and do the following

yum install gcc-c++

Thats it.

这篇关于Eclipse发生错误127的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆