0
votes

I know there are several posts about this already but I really can't seem to figure this out at all.

I downloaded Eclipse from the website (Eclipse for C++) and it downloaded Eclipse mars etc. I tried using the example hello world project to see if it worked and I keep getting the Launch failed. Binary not found error.

Error

I have downloaded XCode (don't know why but I read that I needed that for a GCC or something) I am using the MacOS GCC and also tried the other GCC but both give me the same error

Someone please help me and ask me for any details I need to provide...

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 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
Hi, I DID state that there are several posts about this and that includes the following link you provided. I need SPECIFIC help to my case, and that does NOT help me - Panthy
The simple answer in the link is the reason - the binary is not found because it wasn't built. Looking at your screenshot, it clearly shows that make all did nothing. Can you share your makefile? - Steven Palmer
Try to click on the little gear icon next to the hamer. You'll see two choices: one is Debug, the other is Release; one of them is selected (I assume release). Select the other one, build the project again by clicking on the hammer, and try to run the project by clicking on the green arrow. Hope this helps. - RHertel

2 Answers

1
votes

This is usually due to selecting the wrong toolchain during creation of a new C++ project. Not obvious how to remedy this, and very unfortunate when one has no prior experience with eclipse.

Create a new C++ project and click next.



Enter Project name, click on Hello World C++ Project and click on MacOSX GCC in Toolchains. This last selection is very important, otherwise it will not build.

I assume xcode is installed. Hope this solves your issue.

0
votes

First you have to go "Project" Menu and click on "Build All". After that you can click on "Run" button to run your project.