C++

Paul Mclachlan (pdmclach@nospam.ftoomsh.socs.uts.edu.au)
Fri, 24 Mar 1995 12:23:30 +1000 (EST)

uh... I'm trying to write a, well... some talker software. For really
stupid reasons, it is called 'tos'. *anyway*... when I link I get
undefined symbols... but I can't work out exactly _what_ is missing...

I've checked the name mangling... but I think I'm getting it wrong
somewhere... if someone can just look at it and tell me whats wrong, then
that'd be great (otherwise, like all programmers, I'll just keep
persevering) [is that how that's spelt?].

Anyway... here is a little typescript of the makefile, files and a link
that failed... oh... does anyone know what mangles to get that __$ thang?

// --- starting here
Script started on Fri Mar 24 12:18:50 1995
ftoomsh% ls -l
total 52
-rw------- 1 pdmclach 1082 Mar 20 12:45 Makefile
-rw------- 1 pdmclach 3189 Mar 3 17:39 argument.cxx
-rw------- 1 pdmclach 1063 Mar 3 17:40 argument.h
-rw------- 1 pdmclach 62 Feb 14 03:40 call.cxx
-rw------- 1 pdmclach 173 Mar 4 14:41 call.h
drwx------ 2 pdmclach 512 Mar 20 12:12 command/
-rw------- 1 pdmclach 4653 Mar 4 14:42 command.cxx
-rw------- 1 pdmclach 582 Mar 20 12:41 command.h
-rw------- 1 pdmclach 2374 Mar 20 12:33 connection.cxx
-rw------- 1 pdmclach 413 Feb 21 16:18 connection.h
-rw------- 1 pdmclach 1052 Mar 4 12:05 glue.cxx
-rw------- 1 pdmclach 99 Feb 21 15:23 glue.h
-rw------- 1 pdmclach 518 Feb 14 02:52 group.h
-rw------- 1 pdmclach 835 Mar 4 14:30 input.cxx
-rw------- 1 pdmclach 540 Feb 15 15:31 input.h
drwx------ 2 pdmclach 512 Mar 20 12:12 interactive/
-rw------- 1 pdmclach 77 Mar 20 12:31 interactive.cxx
-rw------- 1 pdmclach 184 Mar 20 12:31 interactive.h
-rw------- 1 pdmclach 450 Feb 17 15:04 link.cxx
-rw------- 1 pdmclach 249 Feb 14 02:54 link.h
-rw------- 1 pdmclach 759 Mar 4 13:07 log.cxx
-rw------- 1 pdmclach 230 Feb 15 19:15 log.h
-rw------- 1 pdmclach 366 Feb 16 19:50 oblivion_rev.h
-rw------- 1 pdmclach 249 Mar 4 13:12 player.cxx
-rw------- 1 pdmclach 271 Feb 14 18:35 player.h
-rw------- 1 pdmclach 62 Feb 14 03:34 room.cxx
-rw------- 1 pdmclach 157 Feb 14 03:43 room.h
-rw------- 1 pdmclach 3534 Mar 4 13:15 socket.cxx
-rw------- 1 pdmclach 401 Mar 3 13:09 socket.h
-rw------- 1 pdmclach 176 Jul 24 1994 standard.h
-rw------- 1 pdmclach 620 Mar 4 13:15 talker.cxx
-rw------- 1 pdmclach 357 Mar 2 17:09 talker.h
-rw------- 1 pdmclach 1102 Mar 4 13:16 text.cxx
-rw------- 1 pdmclach 216 Mar 4 13:16 text.h
-rw------- 1 pdmclach 0 Mar 24 12:18 typescript
-rw------- 1 pdmclach 173 Feb 15 20:39 version.c
-rw------- 1 pdmclach 53 Feb 15 14:54 version.h
ftoomsh% cat Makefile
CC = gcc
CFLAGS =
OBJDIR = ../junk
BINDIR = ../bin
SERVER = tos

OBJS = $(OBJDIR)/call.o \
$(OBJDIR)/command.o \
$(OBJDIR)/argument.o \
$(OBJDIR)/glue.o \
$(OBJDIR)/input.o \
$(OBJDIR)/interactive.o \
$(OBJDIR)/link.o \
$(OBJDIR)/log.o \
$(OBJDIR)/player.o \
$(OBJDIR)/room.o \
$(OBJDIR)/talker.o \
$(OBJDIR)/text.o \
$(OBJDIR)/version.o \
$(OBJDIR)/connection.o \
$(OBJDIR)/socket.o \
$(OBJDIR)/interactive/connect.o \
$(OBJDIR)/interactive/echoback.o \
$(OBJDIR)/interactive/parse.o \
$(OBJDIR)/command/say.o

all: $(OBJS)
$(CC) $(CFLAGS) $(OBJS) -o $(BINDIR)/$(SERVER)

clean:
rm $(OBJDIR)/* $(OBJDIR)/*/*

$(OBJDIR)/version.o: version.c version.h
$(CC) $(CFLAGS) -c version.c -o $(OBJDIR)/version.o

$(OBJDIR)/%.o: %.cxx %.h
$(CC) $(CFLAGS) -c $*.cxx -o $(OBJDIR)/$*.o

$(OBJDIR)/interactive/%.o: interactive/%.cxx interactive/%.h
$(CC) $(CFLAGS) -c interactive/$*.cxx -o $(OBJDIR)/interactive/$*.o

$(OBJDIR)/command/%.o: command/%.cxx command/%.h
$(CC) $(CFLAGS) -c command/$*.cxx -o $(OBJDIR)/command/$*.o
ftoomsh% make
gcc ../junk/call.o ../junk/command.o ../junk/argument.o ../junk/glue.o ../junk/input.o ../junk/interactive.o ../junk/link.o ../junk/log.o ../junk/player.o ../junk/room.o ../junk/talker.o ../junk/text.o ../junk/version.o ../junk/connection.o ../junk/socke
t.o ../junk/interactive/connect.o ../junk/interactive/echoback.o ../junk/interactive/parse.o ../junk/command/say.o -o ../bin/tos
ld: Undefined symbol
_invoke__7COMMANDP4CALL
__$_7COMMAND
ld: ../bin/l.outa10285: No such file or directory
ld: ../bin/l.outa10285: output write error: Bad file number
collect2: ld returned 2 exit status
make: *** [all] Error 1
ftoomsh% exit
ftoomsh%
script done on Fri Mar 24 12:19:21 1995

Thanks,
Paul

-----
Paul Mclachlan
pdmclach@nospam.ftoomsh.socs.uts.edu.au