- r - 以节省内存的方式增长 data.frame
- ruby-on-rails - ruby/ruby on rails 内存泄漏检测
- android - 无法解析导入android.support.v7.app
- UNIX 域套接字与共享内存(映射文件)
这是我第一次使用Eclipse,也是我第一次在linux环境下编程。所以我最终可能会发布一些半无用的信息,但我只是想尽我所能提供详细信息。
问题:我正在尝试构建一个项目,但收到以下错误和警告。
问题:要在 IDE 中开始在 Linux 中使用 C++,我必须做什么或必须做什么?修复错误会很好,但上述是我的基本目标。
IDE 信息:
Eclipse
Version: Helios Release
Build id: 20100617-1415
操作系统信息:
Fedora 13: i686
错误(1 项)
make: *** [src/xoorMath.o] Error 127 xoorMath C/C++ Problem
警告(2 项)
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
源代码
//============================================================================
// 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;
}
生成的 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
编辑尝试运行 '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]#
最佳答案
真正简单的解决方案。原来我没有g++。我安装了 gcc,也许这里有人知道其中的区别,如果可以,请不吝赐教。
我必须进入控制台并执行以下操作
yum install gcc-c++
就是这样。
关于c++ - Eclipse 报错 127,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/3478877/
我正在努力学习本教程 https://github.com/cf-platform-eng/spring-boot-cities/tree/master/cities-service在 Cloud F
0){ echo "Username or email already exists."; }else{ $query = mysql_que
我想在Linux上编译ARToolKit源码,下载源码,按照ARToolKit文档,配置GLUT , OpenGL, libjpeg 等库。 转到 ARToolKit 目录并键入 ./Configer
你好,我在这个程序中遇到错误,wcout 不是 `std' 的成员。如您所见,我也使用了 iostream,但没有用。我有 Dev-C++ 4.9.9.2,我的操作系统是 XP SP3我需要你的帮助。
我尝试对一个网站进行多次投票,但我得到: panic: runtime error: invalid memory address or nil pointer dereference [signal
当我将“ using namespace std; int main(){ string s[30]; int n = 20; for(int i = 0; i using
我设置了 EMAIL_URL process.env.MAIL_URL="smtp://xx%40gmail.com:yyy@smtp.gmail.com:465" 这个工作找到了 Email.sen
我有如下文件夹结构 . ├── docker-compose.yml └── web-app ├── create_tomcat_admin.sh ├── Dockerfile
这是我在 php 中的查询代码: $query3 = mysql_query("SELECT * FROM area_of_work") or die('Invalid query:'. mysql_
我正在尝试将 therubyracer/therubyracer-heroku 安装到我的应用程序,因为它在 heroku 服务器中不起作用,因为我没有 javascript 运行时环境。 当我尝试安
我正在开发一个非常简单的 React 应用程序。它有一个组件,在这个组件中,我试图在单击链接时设置状态。但出于某种原因,setState 甚至没有得到认可。它带有下划线,表示未解析的函数或方法 set
我有三个来源:代码处理.h typedef enum {typeBool, typeVarDeclaration, typeFuncDeclaration } nodeEnum; typedef st
我正在尝试从我的 Android 手机向 raspi 发送连续的命令。我使用了此链接中的代码,但出现错误。 链接:https://stackoverflow.com/questions/2347143
我正在尝试从数据库中加载数据并将其放入不同的 View 中。 log cat 返回错误,它找不到“_id”列。 有人可以帮我解决这个问题吗? SqlHelper代码: public class Fib
我的alertview给出了这个问题..它与sqlite无关..它给出了一些信息.. 我该如何解决这个问题? UIAlertView *infoShow = [[UIAlertView alloc]
这个问题在这里已经有了答案: launch activities from different package (5 个答案) 关闭 10 年前。 最近我一直在开发一个新的应用程序,我正在尝试使用
这是我的代码: #include #include typedef struct test { int *a; char *s; }TEST; int main (void) {
所以我定义了一个函数,如果它是由它的 lonesome 实现的,那么它非常适合对线性数组进行合并排序,但是如果我把它放到一个类中,它就会出错。我认为这是一个很好的例子,说明我不太了解类(class)的
我是 IOS 新手。我有一个示例项目,并试图在此基础上学习 Obj-C。 现在我正处于学习如何使用 UIAlertController 的阶段。我有这样的代码: if (loanAmount == 0
当我尝试使用 wincachegrind 并获取 cachegrind 文件时,它返回 Cannot find call target. cachegrind.out line number:68 有
我是一名优秀的程序员,十分优秀!