This is the mail archive of the gcc-help@gcc.gnu.org mailing list for the GCC project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

Re: Undefined References


On Dec 1, 2007 6:42 AM, Michael Sullivan <michael@espersunited.com> wrote:
...
> > LIBS=`sdl-config --cflags --libs` -lSDL_image -lSDL_gfx -lSDL_ttf

Show the output from make initially so I can see the results of the LIBS line.

What is the 'reset' for in your make commands?

A more conventional way to structure the makefile for your situation is:

CXX=g++
INC = -I/usr/include/SDL

all: battle

battle: battle.o character.o
<tab>$(CXX) -o $@ battle.o character.o $(LIBS)

%.o : %.cpp
<tab>$(CXX) $(CFLAGS) $< -o $@ $(INC)


That way 'all' is the default target and you can just command 'make'.

Now, again, I suspect the location of the libraries is part of the
problem.  Is the library set publicly available (and free)?

> Is it normal for only portions of make all to run at a time?

Yes, if it detects a target needing remaking.

-Tom

Tom Browder
Niceville, Florida
USA


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]