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 8:28 AM, Michael Sullivan <michael@espersunited.com> wrote:
...
> michael@camille ourrpg $ rm *.o

A target line at the end of Makefile will ease that:

clean:
<tab>-rm *.o battle *~

Then you can do:

  make clean

> g++ -W -Wall -pedantic -c battle.cpp -o battle.o -I/usr/include/SDL
> battle.cpp: In member function 'SDL_Surface* battle::drawString(int,
> int, char*)':
> battle.cpp:72: warning: missing initializer for member
> 'SDL_Color::unused'

A C++ error.

> g++ -W -Wall -pedantic -c character.cpp -o character.o
> -I/usr/include/SDL
> g++ -o battle battle.o character.o `sdl-config --cflags --libs`
> -lSDL_image -lSDL_gfx -lSDL_ttf
> battle.o: In function `battle::battle()':
> battle.cpp:(.text+0x9e3): undefined reference to
> `Character::Character()'
...

I'm investigating.

-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]