Discussion:
Makefile:10: *** missing separator. Stop.
(too old to reply)
owolablo
2006-09-19 13:14:48 UTC
Permalink
Hi,
I'm following the guide in section 2.5 of APG in order to biuld a
client-server application.The application has two files so I have
copied the second Makefile example in the section mentioned above.The
code for the Makefile now looks as follows:

BIN = comnet
FILES = comnet_client comnet_server
SRC= $(addsuffix .cpp,$(FILES))
OBJ= $(addsuffix .o,$(FILES))
BUILD = $(VBIN)
LDFLAGS = -L$(ACE_ROOT)/lib
#---------------------------------------------------------
# Include macros and targets
#---------------------------------------------------------
include $(ACE_ROOT)/include/makeinclude/wrapper_macros.GNU /
include $(ACE_ROOT)/include/makeinclude/macros.GNU
include $(ACE_ROOT)/include/makeinclude/rules.common.GNU
include $(ACE_ROOT)/include/makeinclude/rules.nonested.GNU
include $(ACE_ROOT)/include/makeinclude/rules.bin.GNU
include $(ACE_ROOT)/include/makeinclude/rules.local.GNU

However on typing "make" in the directory containing the source files
(comnet_client.cpp,comnet_server.cpp), It gives the following 2 lines
of error:

GNUmakefile: /home/ACE_wrappers/examples/comnet/GNUmakefile MAKEFLAGS=

make: *** No rule to make target `.obj/comnet.o', needed by `comnet'.
Stop.

I'm a newby to both linux programming and ACE and I don't know what to
do.Waht could be wrong.Thank you.
limpas
2006-09-19 17:59:18 UTC
Permalink
Post by owolablo
Hi,
I'm following the guide in section 2.5 of APG in order to biuld a
client-server application.The application has two files so I have
copied the second Makefile example in the section mentioned above.The
BIN = comnet
FILES = comnet_client comnet_server
SRC= $(addsuffix .cpp,$(FILES))
OBJ= $(addsuffix .o,$(FILES))
BUILD = $(VBIN)
LDFLAGS = -L$(ACE_ROOT)/lib
#---------------------------------------------------------
# Include macros and targets
#---------------------------------------------------------
include $(ACE_ROOT)/include/makeinclude/wrapper_macros.GNU /
include $(ACE_ROOT)/include/makeinclude/macros.GNU
include $(ACE_ROOT)/include/makeinclude/rules.common.GNU
include $(ACE_ROOT)/include/makeinclude/rules.nonested.GNU
include $(ACE_ROOT)/include/makeinclude/rules.bin.GNU
include $(ACE_ROOT)/include/makeinclude/rules.local.GNU
However on typing "make" in the directory containing the source files
(comnet_client.cpp,comnet_server.cpp), It gives the following 2 lines
GNUmakefile: /home/ACE_wrappers/examples/comnet/GNUmakefile MAKEFLAGS=
make: *** No rule to make target `.obj/comnet.o', needed by `comnet'.
Stop.
I'm a newby to both linux programming and ACE and I don't know what to
do.Waht could be wrong.Thank you.
not sure, but try adding this at the end of a Makefile

.obj/comnet.o: comnet_client.cpp comnet_client..h \
comnet_server.cpp comnet_client.h

if you don't have .h files just simply remove them.
owolablo
2006-09-20 08:55:41 UTC
Permalink
I added the following code:
.obj/comnet.o: comnet_client.cpp \
comnet_server.cpp
(I don't have header files in my project)
at the end of the Makefile and it still doesn't compile! What else can
I do? I really need to get this code to work.
Thank you.
Douglas C. Schmidt
2006-09-20 12:49:39 UTC
Permalink
Hi,

You are probably missing a "tab" on line 10.

Take care,

Doug
Post by owolablo
.obj/comnet.o: comnet_client.cpp \
comnet_server.cpp
(I don't have header files in my project)
at the end of the Makefile and it still doesn't compile! What else can
I do? I really need to get this code to work.
Thank you.
--
Dr. Douglas C. Schmidt Professor and Associate Chair
Electrical Engineering and Computer Science TEL: (615) 343-8197
Vanderbilt University WEB: www.dre.vanderbilt.edu/~schmidt
Nashville, TN 37203 NET: ***@vanderbilt.edu
owolablo
2006-09-20 13:31:12 UTC
Permalink
Prof,
Thanks for your help.
But It didn't work!
By "tab", do you mean the space generated by the "tab" key on my
keyboard?
I included the tab after the "include" keyword on line 10, as advised
and it made a difference.But the error message is now as follows:

GNUmakefile: /home/ACE_wrappers/examples/comnet/GNUmakefile MAKEFLAGS=

make: *** No rule to make target `.obj/hello_ace.o', needed by
`hello_ace'. Stop.

Why does this happen and what can I do to get my codes compiled?
My supervisor saw my work so far and was pleased at the capabilities of
ACE (I introduced him to it).But I need to compile my codes to obtain
results (and good grades)!
Please help.
God bless.

Loading...