A Link Error about STL

Discussion in 'C++' started by DDD, Mar 4, 2011.

  1. DDD

    DDD Guest

    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.
     
    DDD, Mar 4, 2011
    #1
    1. Advertising

  2. DDD

    Puppet_Sock Guest

    On Mar 4, 10:19 am, DDD <> wrote:
    > 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
     
    Puppet_Sock, Mar 4, 2011
    #2
    1. Advertising

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

It takes just 2 minutes to sign up (and it's free!). Just click the sign up button to choose a username and then you can ask your own questions on the forum.
Similar Threads
  1. Kevin Spencer

    Re: Link Link Link DANGER WILL ROBINSON!!!

    Kevin Spencer, May 17, 2005, in forum: ASP .Net
    Replies:
    0
    Views:
    860
    Kevin Spencer
    May 17, 2005
  2. =?ISO-8859-15?Q?R=E9mi_Peyronnet?=

    STL & basic_string<XMLCh> link error

    =?ISO-8859-15?Q?R=E9mi_Peyronnet?=, Feb 16, 2004, in forum: C++
    Replies:
    0
    Views:
    535
    =?ISO-8859-15?Q?R=E9mi_Peyronnet?=
    Feb 16, 2004
  3. sriram
    Replies:
    5
    Views:
    771
    sriram
    Mar 16, 2005
  4. mcole
    Replies:
    1
    Views:
    1,074
    Lionel B
    Apr 14, 2005
  5. pervinder

    STL link error on AIX

    pervinder, Aug 4, 2004, in forum: C Programming
    Replies:
    2
    Views:
    1,149
    Thomas Matthews
    Aug 4, 2004
Loading...

Share This Page