Skip to main content


Eclipse Community Forums
Forum Search:

Search      Help    Register    Login    Home
Home » Language IDEs » C / C++ IDE (CDT) » Can't build Hello World(Newly installed Eclipse fails to build Hello World)
Can't build Hello World [message #1822206] Sat, 29 February 2020 21:08 Go to next message
Samuel Johnson is currently offline Samuel JohnsonFriend
Messages: 9
Registered: November 2016
Junior Member
I am a new user of Eclipse. (I have been using Builder from Embarcadero.) I thought I installed Eclipse successfully, but when I try to create the HelloWorld project, it fails to build. I get the following message pasted below. For what it's worth, I'm following the directions in
https://www.codeguru.com/cpp/cpp/getting-started-with-c-for-eclipse.html
which are consistent with the directions in the "Creating a Simple Project" in Eclipse - Help but are more detailed and complete and include directions for installing MinGW. (Incidentally, I initially posted this in "Newcomers," but someone there suggested I post it here.)

What's going on? What have I omitted? What am I doing wrong? All help will be appreciated.

Samuel J

14:07:46 **** Build of configuration Debug for project HelloWorld ****
make all
MAKE Version 5.41 Copyright (c) 1987, 2014 Embarcadero Technologies, Inc.
Error makefile 6: Command syntax error
Error makefile 11: Command syntax error
Error makefile 12: Command syntax error
Error makefile 13: Command syntax error
Error makefile 14: Command syntax error
Error makefile 16: Command syntax error
Error makefile 17: Command syntax error
Error makefile 18: Command syntax error
Error makefile 19: Command syntax error
Error makefile 20: Command syntax error
Error makefile 21: Command syntax error
Error makefile 22: Command syntax error
Error makefile 23: Command syntax error
Error makefile 24: Command syntax error
Error makefile 25: Command syntax error
Error makefile 26: Command syntax error
Error makefile 27: Command syntax error
Error makefile 28: Command syntax error
Error makefile 29: Command syntax error
Error makefile 30: Command syntax error
Error makefile 31: Command syntax error
Error makefile 32: Command syntax error
Error makefile 33: Command syntax error
Error makefile 34: Command syntax error
Error makefile 35: Command syntax error
Error makefile 37: Command syntax error
Error makefile 59: Command syntax error
*** 27 errors during make ***
"make all" terminated with exit code 1. Build might be incomplete.
Re: Can't build Hello World [message #1822209 is a reply to message #1822206] Sun, 01 March 2020 01:47 Go to previous messageGo to next message
David VavraFriend
Messages: 1426
Registered: October 2012
Senior Member
Eclipse expects to use GNU make or some version of it.
MingGW has a Windows version of GNU make.

You're building with Embarcadero Technologies Make.
It may be incompatible with the Makefile generated by Eclipse.
Make sure the MinGW executables are at the beginning of your PATH.

If the MinGW version still gives these errors then upload the makefile so we can see it.
Re: Can't build Hello World [message #1822263 is a reply to message #1822209] Mon, 02 March 2020 19:06 Go to previous messageGo to next message
Samuel Johnson is currently offline Samuel JohnsonFriend
Messages: 9
Registered: November 2016
Junior Member
Here's the 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: Second_try

# Tool invocations
Second_try: $(OBJS) $(USER_OBJS)
@echo 'Building target: $@'
@echo 'Invoking: Cross G++ Linker'
mingw32-g++ -o "Second_try" $(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) Second_try
-@echo ' '

.PHONY: all clean dependents

-include ../makefile.targets
Re: Can't build Hello World [message #1822276 is a reply to message #1822263] Tue, 03 March 2020 04:08 Go to previous messageGo to next message
David VavraFriend
Messages: 1426
Registered: October 2012
Senior Member
Sorry, I meant to upload it as an attachment.
I can't tell what lines are real vs. inserted by the forum.
Plus, I can't see if there are any strange characters.

Also need,

  • The actual build log
  • The included files, also as attachments:

    • -include ../makefile.init
    • -include sources.mk
    • -include src/subdir.mk
    • -include subdir.mk
    • -include objects.mk
    • -include ../makefile.targets

  • The Eclipse and CDT versions
  • The MinGW version

I'm not in a position to actually execute MinGW Make but I can try it against the version of GNU Make that I have.

Re: Can't build Hello World [message #1822306 is a reply to message #1822276] Tue, 03 March 2020 16:46 Go to previous messageGo to next message
Tauno Voipio is currently offline Tauno VoipioFriend
Messages: 742
Registered: August 2014
Senior Member
The OP is using a wrong make program, but he insists that there is something wrong in the makefile.

He should read the CDT Help section 'Before you begin' and the MinGW/MSYS instructions.


--

Tauno Voipio
Re: Can't build Hello World [message #1822358 is a reply to message #1822306] Wed, 04 March 2020 20:46 Go to previous messageGo to next message
Samuel Johnson is currently offline Samuel JohnsonFriend
Messages: 9
Registered: November 2016
Junior Member
I read the Help CDT Before you Begin, and I already did what it said, i.e., "the MinGW bin directory is placed in your path."

So, I think the problem is with the installation of MSYS. I reviewed those instructions and tried to do that installation, but it seems to have failed. It did create a directory c:\mysys, but there's nothing in it.

In trying to install, I got two error messages:

First,
an error was due to a typo when I tried to supply the directory where MinGW was installed. I got the message:
I could not find c:/[my_mistaken_entry]/bin/gcc.exe. You must have given an invalid path to your MinGW environment. I am reversing to no MinGW
installation. If you do have MinGW installed then you can manually
bind the mount point /mingw to C:/mingw (replace C: with the
drive of your choice) by creating an /etc/fstab file with a line
that has a value similar to:
C:/mingw /mingw

I don't how to implement this fix.

Second
At the end of the installation I got the message
MinGW-1.1 has a version of make.exe within it's bin/ directory.
Please be sure to rename this file to mingw32-make.exe once youve
echo installed MinGW-1.1 because it\s very deficient in function.
Again, I don't know where the file is that needs to be renamed.

Thanks for the help.
Re: Can't build Hello World [message #1822359 is a reply to message #1822276] Wed, 04 March 2020 20:48 Go to previous messageGo to next message
Samuel Johnson is currently offline Samuel JohnsonFriend
Messages: 9
Registered: November 2016
Junior Member
Could you possibly look at my reply to Voipio and see if yo u can shed light? Thanks!
Re: Can't build Hello World [message #1822474 is a reply to message #1822359] Sat, 07 March 2020 19:17 Go to previous messageGo to next message
Tauno Voipio is currently offline Tauno VoipioFriend
Messages: 742
Registered: August 2014
Senior Member
Sorry, I do not have any reasonably recent Windows to check the situation, an old XP does not count anymore.

--

Tauno Voipio
Re: Can't build Hello World [message #1860674 is a reply to message #1822206] Thu, 24 August 2023 22:31 Go to previous message
Clifton Liles is currently offline Clifton LilesFriend
Messages: 18
Registered: October 2011
Location: Texas
Junior Member
Hi
Did you ever get an answer? I have the same problem.
See: https://www.eclipse.org/forums/index.php/m/1860611/#msg_1860611
I am using CYGWIN.
Cliff


Failure is not an option. It comes bundled with your Microsoft products.
Previous Topic:Formatter does not insert spaces for sizeof()
Next Topic:BAT shell redirect to eclipse CDT Console
Goto Forum:
  


Current Time: Fri Sep 20 21:39:04 GMT 2024

Powered by FUDForum. Page generated in 0.04970 seconds
.:: Contact :: Home ::.

Powered by: FUDforum 3.0.2.
Copyright ©2001-2010 FUDforum Bulletin Board Software

Back to the top