[plug] C++ errors

Andrew Pamment pamment at iinet.net.au
Sun Jun 1 14:38:31 WST 2003


Hi

I am writing a KDE application and am having some problems the first
problem is it doesn't work. I keep getting an error from ld when I try
and compile. I'm not too worried about what's wrong with my program, but
I would like someone to explain to me what this error means:

generaloptions.o(.text+0x0): In function
`generalOptions::generalOptions[not-in-charge](QWidget*, char const*,
unsigned)':
: multiple definition of
`generalOptions::generalOptions[not-in-charge](QWidget*, char const*,
unsigned)'
generaloptions.o(.text+0x0): first defined here
generaloptions.o(.text+0xcf4): In function
`generalOptions::languageChange()':
: multiple definition of `generalOptions::languageChange()'
generaloptions.o(.text+0xcf4): first defined here
generaloptions.o(.text+0x640): In function
`generalOptions::generalOptions[in-charge](QWidget*, char const*,
unsigned)':
: multiple definition of
`generalOptions::generalOptions[in-charge](QWidget*, char const*,
unsigned)'
generaloptions.o(.text+0x640): first defined here
generaloptions.o(.text+0xc80): In function
`generalOptions::~generalOptions [not-in-charge]()':
: multiple definition of `generalOptions::~generalOptions
[not-in-charge]()'
generaloptions.o(.text+0xc80): first defined here
generaloptions.o(.text+0xca4): In function
`generalOptions::~generalOptions [in-charge]()':
: multiple definition of `generalOptions::~generalOptions [in-charge]()'
generaloptions.o(.text+0xca4): first defined here
generaloptions.o(.text+0xcc8): In function
`generalOptions::~generalOptions [in-charge deleting]()':

and so on. Now using my not-quite-infinite wisdom, I have deduced that
some things have been defined multiple times.. but I am at a loss to
figure out what and how.

My generaloptions.h looks ok.. it has the #ifndef GENERALOPTIONS_H and
so on so it doesn't get included twice.. I really have no idea what's
going on. I've been compiling on my flatmate's slackware 9.0 setup

my other problem is a gentoo specific one. I upgraded my compiler half
way through writing my program and whenever I try to compile it tries to
link to the old gcc libraries which dont exist anymore.. i checked out
my ld.so.conf and the new gcc lib path is in there (and the old one
removed) i have run ldconfig. I can't figure out what's going on.

any help or guesses or ideas would be appreciated.

thanks
andrew

-- 
Andrew Pamment 
(http: http://members.iinet.net.au/~pamment/) (ICQ: 136239083)      
(MSN: thegodsthemselves at hotmail.com)          (Yahoo!: apamment)

"Abashed the Devil stood, And felt how awful goodness is, and saw Virtue
in her shape how lovely; saw, and pined His loss." John Milton.
-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 189 bytes
Desc: This is a digitally signed message part
URL: <http://lists.plug.org.au/pipermail/plug/attachments/20030601/99ecb3bf/attachment.pgp>


More information about the plug mailing list