Undefined References

Tom Browder tom.browder@gmail.com
Sat Dec 1 13:09:00 GMT 2007


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



More information about the Gcc-help mailing list