Re: Undefined References

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



On Dec 1, 2007 6:42 AM, Michael Sullivan <michael@xxxxxxxxxxxxxxxx> 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 of Archives]     [Linux C Programming]     [Linux Kernel]     [eCos]     [Fedora Development]     [Fedora Announce]     [Autoconf]     [The DWARVES Debugging Tools]     [Yosemite Campsites]     [Yosemite News]     [Linux GCC]

  Powered by Linux