A Link Error about STL

D

DDD

Hi,
Can anyone explain these two error more details?

1>LIBCMTD.lib(stdexcpt.obj) : error LNK2005: “public: virtual
__thiscall std::exception::~exception(void)” (??
1exception@std@@UAE@XZ) already defined in Main.obj
1>LIBCMTD.lib(stdexcpt.obj) : error LNK2005: “public: virtual char
const * __thiscall std::exception::what(void)const ” (?
what@exception@std@@UBEPBDXZ) already defined in Main.obj

Thanks in advance.
 
P

Puppet_Sock

Hi,
Can anyone explain these two error more details?

1>LIBCMTD.lib(stdexcpt.obj) : error LNK2005: “public: virtual
__thiscall std::exception::~exception(void)” (??
1exception@std@@UAE@XZ) already defined in Main.obj
1>LIBCMTD.lib(stdexcpt.obj) : error LNK2005: “public: virtual char
const * __thiscall std::exception::what(void)const ” (?
what@exception@std@@UBEPBDXZ) already defined in Main.obj

Thanks in advance.

I'm just taking a wild stab in a dimly lit room.
You seem to have double-included something that
does not have proper double-include guards, or
you have managed somehow to break the guards.

If it was me, I would be "rounding up the usual
suspects." I'm guessing you are using Microsoft's
compiler. Try starting with the flags for stricter
compliance. Try not using the using directive.
Try making a debug copy of your project and removing
half the code and see if it still gives the message.
The usual stuff.
Socks
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Members online

Forum statistics

Threads
473,768
Messages
2,569,575
Members
45,054
Latest member
LucyCarper

Latest Threads

Top