1. CodeWarrior Linux and ld error messages
I received a lovely copy of Metrowerks CW 6.0 Linux Edition by courier
today....mmmmm..
But when building an OpenGL app which used to compile, link & work fine
with my Makefile which I used to use, I received about 148 errors.
I've now managed to get it down to 1 error, but don't understand enough
about what it means in order to sort it out. The message is:
Link error: model.c.o (.data+0x0): multiple definition of
'lightposition'
grow.c.o (.data+0x24): first defined here
model.c.o (.data+0x10): multiple definition of 'lightdirection'
grow.c.o (.data+0x34): first defined here
model.c.o (.data+0x1c): multiple definition of 'grnd'
grow.c.o (.data+0x40): first defined here
collect2: ld returned exit 1 status
collect2: ld returned exit 1 status
The three variables that it refers to are defined (ONCE) in model.h (not
model.c) and nowhere else. I've spent hours trying to figure this out,
and I think the cheif problem is that I don't quite understand how
CodeWarrior is linking all this stuff together.
Can anyone help me figure out what's going on here? Or at least point me
to a document which explains ld's error messages, because it's driving
me nuts.
Would it be better if I uninstalled CodeWarrior and installed it with
the GCC version that comes with it? I am using version 2.95.3 and I
believe that the version that comes with it is 2.95.2.
Thanks in anticipation,
Peter Mantell
--
"Life would be so much easier if we could just look at the source code."
-- Dave Olson
2. QNX
3. GCC/ld error linking shared X libs
4. compatibility of large IDE drive
5. GCC/LD error values-Xa.o on Solaris 7 (Sparc)
6. amdk6/ficpa2007
7. Weird ld error when compiling
8. What's the newest LinuxPPC CD-ROM?
9. ld error message
10. ld Error on g++ compile - Help needed!
11. ld error while compiling fvwm
12. Wierd ld error - can't find -ldl
13. XPilot compile give ld error