i try to develop a make file and i got this error :

Dependency line needs colon or double colon operator.

my makefile is in this state yet:

Books.o: Books.cpp include/author.h include/Booksh.h include/library.h
	xlC -c SourceFiles/Books.cpp -l vista -L/sbx/asc/slib -I/user/serkans/myprog/BookLibraryTrial/include -I/sbx/asc/vista

libMan : main.cpp cmnlib/libfoo.a
	xlC main.cpp cmnlib/libfoo.a  -l vista -L/sbx/asc/slib -I/sbx/asc/vista -I/sbx/asc/inst/TRAINING++/include -bhalt:5

what could be the problem?

Recommended Answers

All 3 Replies

Probably more of a linux question than a c++ question.

Dave

i solved that problem, it is because of the empty lines in a make file. Also if you edit a file in a unix server using microsoft visual studio.net, it causes some wierd characters at the end of the lines. So you have to configure the line endings so as not to cause problems

There are also linux utilties dos2unix and unix2dos (or something like that) that will convert the line endings to the appropriate type.

I'm glad you got it working.

Dave

Be a part of the DaniWeb community

We're a friendly, industry-focused community of developers, IT pros, digital marketers, and technology enthusiasts meeting, networking, learning, and sharing knowledge.