MAC OS Eclipse C ++启动二进制文件失败

时间:2016-02-23 16:30:57

标签: c++ eclipse macos

我知道有几篇关于此的帖子,但我似乎无法弄清楚这一点。

我从网站(Eclipse for C ++)下载了Eclipse,它下载了Eclipse mars等。我尝试使用示例hello world项目来查看它是否有效并且我一直在使启动失败。二进制未找到错误。

Error

我已下载XCode(不知道为什么,但我读到我需要GCC或其他东西) 我正在使用MacOS GCC并尝试了其他GCC,但两者都给了我同样的错误

有人请帮助我,并向我询问我需要提供的任何细节......

...生成文件

    ################################################################################
# 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 src/subdir.mk
-include subdir.mk
-include objects.mk

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

-include ../makefile.defs

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

# All Target
all: lolplz

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

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

.PHONY: all clean dependents
.SECONDARY:

-include ../makefile.targets

2 个答案:

答案 0 :(得分:1)

这通常是由于在创建新C ++项目期间选择了错误的工具链。如何解决这个问题并不明显,而且当一个人没有日食经验时非常不幸。

创建一个新的C ++项目,然后单击“下一步”。



输入项目名称,单击Hello World C ++项目,然后单击工具链中的MacOSX GCC。最后的选择非常重要,否则无法构建。

我假设已安装xcode。希望这能解决你的问题。

答案 1 :(得分:0)

首先,您必须转到“项目”菜单,然后单击“全部构建”。之后,您可以单击“运行”按钮来运行您的项目。

相关问题