Skip to main content


Eclipse Community Forums
Forum Search:

Search      Help    Register    Login    Home
Home » Language IDEs » C / C++ IDE (CDT) » Require assistance with the makefile(The makefile instructions leave out a bit.)
Require assistance with the makefile [message #1284718] Fri, 04 April 2014 20:21 Go to next message
Steven Haynes is currently offline Steven HaynesFriend
Messages: 2
Registered: April 2014
Junior Member
Hi all,

This may be simple but I am not getting it. I was trying to build my first program but have never built a makefile before.

The following file was produced from the notes in Eclipse. They were wrong in the fact I needed the "\" on each line or I had to make them a single line. Then after I completed that I got the error "make *** target pattern contains no '%'. Stop" It is line 32 the dependencies. So two questions. 1) What is wrong? 2) The header file is from another project which is to be included, is there any short hand?

While I was experimenting I got an (Error 1) no explanation. Not much help, is there a list of errors anywhere that give more information.

Thanks for your help

Steven

# Target of make
LINK_TARGET = cat048_decoder.exe

# List of objects
OBJS = \
cat048_decoder.o

# Define the rebuildables
REBUILDABLES = $(OBJS) $(LINK_TARGET)

# Clean the project
clean : rm -f $(REBUILDABLES)

# Build the execuatble
all : $(LINK_TARGET)

# Build the taget from objects
$(LINK_TARGET) : $(OBJS) \
g++ -g -o $@ $^

# Build the objects
%.o : %.c \
g++ -g -o $@ -c $<

# Dependencies
cat048_decoder.c : c:\home\shaynes\Documents\Nats\AsterixEngine\Headers\asterixDecodingStructures.h <====== This line is the problem.
Re: Require assistance with the makefile [message #1287616 is a reply to message #1284718] Mon, 07 April 2014 23:38 Go to previous message
Russell Bateman is currently offline Russell BatemanFriend
Messages: 3798
Registered: July 2009
Location: Provo, Utah, USA
Senior Member

On 04/07/2014 06:39 AM, Steven Haynes wrote:
> Hi all,
>
> This may be simple but I am not getting it. I was trying to build my
> first program but have never built a makefile before.
>
> The following file was produced from the notes in Eclipse. They were
> wrong in the fact I needed the "\" on each line or I had to make them a
> single line. Then after I completed that I got the error "make ***
> target pattern contains no '%'. Stop" It is line 32 the dependencies. So
> two questions. 1) What is wrong? 2) The header file is from another
> project which is to be included, is there any short hand?
>
> While I was experimenting I got an (Error 1) no explanation. Not much
> help, is there a list of errors anywhere that give more information.
>
> Thanks for your help
>
> Steven
>
> # Target of make
> LINK_TARGET = cat048_decoder.exe
>
> # List of objects
> OBJS = \
> cat048_decoder.o
>
> # Define the rebuildables
> REBUILDABLES = $(OBJS) $(LINK_TARGET)
>
> # Clean the project
> clean : rm -f $(REBUILDABLES)
>
> # Build the execuatble
> all : $(LINK_TARGET)
>
> # Build the taget from objects
> $(LINK_TARGET) : $(OBJS) \
> g++ -g -o $@ $^
>
> # Build the objects
> %.o : %.c \
> g++ -g -o $@ -c $<
>
> # Dependencies
> cat048_decoder.c :
> c:\home\shaynes\Documents\Nats\AsterixEngine\Headers\asterixDecodingStructures.h
> <====== This line is the problem.

It's unclear whether this has anything to do with Eclipse, but at very
least, you should post in the Eclipse CDT forum where you'll find
developers who do C/C++ development in Eclipse.

Cheers.
Previous Topic:How to get project reference associated with a given debug session?
Next Topic:iostream inclusion
Goto Forum:
  


Current Time: Fri Apr 26 02:17:52 GMT 2024

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

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

Back to the top