Index: [thread] [date] [subject] [author]
  From: Robert C. Duvall <rcd@cs.duke.edu>
  To  : 
  Date: 18 Jan 1999 21:27:48 -0500

Re: bowling compile error

First off, let me assure everyone that there are no errors in the
bowling code that would cause it not to compile.

> Can anyone figure out what is problem for the following error message.
> In my cps108/bowling, I simply copy all the file from:
> ~rcduvall/cps108/code/bowling/
> And then I try to do
> make main

The problem here is that the Makefile provided is set up to compile
just by typing "make".  You could also compile by typing "make
bowling" (i.e., the name of the project, but not of any of the .cc
files).  In this case, when you type "make main" it tries to compile
just main.cc into an executable.  In fact, main compiles just fine, 
but ...

> but get error message like:
>
> > >  make main
> > > g++  -g -Wall -I.  -I/afs/acpub/users/o/l/ola/courses/lib -L.
> > > -L/afs/acpub/users/o/l/ola/courses/lib  -R
> > > /afs/acpub/project/cps/lib:/afs/acpub/users/o/l/ola/courses/lib -o main
> > > main.cc -ltapestry
> > > Undefined                       first referenced
> > >  symbol                             in file
> > > TallyScore__C4Gamei                 /var/tmp/cc0JYx_K1.o
> > > GetFrame__C4Gamei                   /var/tmp/cc0JYx_K1.o
> > > __4GameUi                           /var/tmp/cc0JYx_K1.o
> > > SetSkillLevel__4GameUi              /var/tmp/cc0JYx_K1.o
> > > GetScore__C5Frame                   /var/tmp/cc0JYx_K1.o
> > > SetName__4GameG6string              /var/tmp/cc0JYx_K1.o
> > > GetPinCount__C5Framei               /var/tmp/cc0JYx_K1.o
> > > TakeTurn__4Game                     /var/tmp/cc0JYx_K1.o
> > > GetName__C4Game                     /var/tmp/cc0JYx_K1.o
> > > ld: fatal: Symbol referencing errors. No output written to main
> > > *** Error code 1
> > > make: Fatal error: Command failed for target `main'

This indicates a linker error - i.e., in linking your executable it
could not find code for all those functions, so it did not know how to
proceed.

In short, to compile the bowling project, type "make" or "make bowling"

Hope this helps,
rcd


-- 
Robert C. Duvall
Lecturer, Duke University
rcd@cs.duke.edu


Index: [thread] [date] [subject] [author]