[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: damned linker wont eat my function 'main' ! :-(
From: |
Paul Pluzhnikov |
Subject: |
Re: damned linker wont eat my function 'main' ! :-( |
Date: |
20 Apr 2004 19:57:39 -0700 |
User-agent: |
Gnus/5.0808 (Gnus v5.8.8) XEmacs/21.4 (Artificial Intelligence) |
"Michael Shestero" <shestero@postmaster.co.uk> writes:
> g++ -o lispdemo -lm -L/usr/X11R6/lib -lX11
> /usr/lib/crt1.o: In function `_start':
> /usr/lib/crt1.o(.text+0x79): undefined reference to `main'
It would help if you added your object(s) (presumably with main())
to the link line:
g++ -o lispdemo lispdemo.o graphics.o ... -lm -L/usr/X11R6/lib -lX11
> lispdemo: lispdemo.o graphics.o symbcell.o ufuncell.o funccell.o lispcore.o \
> listcell.o memman.o parser.o refer.o bfuncell.o
> $(CPP) -o lispdemo $^ $(LDFLAGS)
This looks like correct rule, except your news client "ate" the
leading <TAB>. Are you using gnu-make or something else?
You may try to rewrite it this way (the $^ appears to be a gnu
extension):
OBJECTS = lispdemo.o graphics.o ...
lispdemo: $(OBJECTS)
$(CPP) -o $@ $(OBJECTS) $(LDFLAGS)
Cheers,
--
In order to understand recursion you must first understand recursion.
Remove /-nsp/ for email.