This is the mail archive of the
gcc-help@gcc.gnu.org
mailing list for the GCC project.
Re: Undefined References
- From: "J.C. Pizarro" <jcpiza at gmail dot com>
- To: "Tom Browder" <tom dot browder at gmail dot com>, gcc-help at gcc dot gnu dot org
- Date: Sat, 1 Dec 2007 16:14:49 +0100
- Subject: Re: Undefined References
On 2007/12/01, "Tom Browder" <tom.browder@gmail.com> wrote:
> 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
Why doesn't it publish the parts of source code character.cpp and
battle.cpp related with their uses and definitions?
Is it well written the Character() constructor?
Are there headers?
J.C.Pizarro