Link problems. Multiple defined. - Programmer

This is a discussion on Link problems. Multiple defined. - Programmer ; My program was linking great. Then I added a whole bunch of new code and when I link, I now get the following link errors: nafxcwd.lib(afxmem.obj) : error LNK2005: "void * __cdecl operator new(unsigned int)" (??2@YAPAXI@Z) already defined in LIBCMTD.lib(new.obj) ...

+ Reply to Thread
Results 1 to 2 of 2

Thread: Link problems. Multiple defined.

  1. Link problems. Multiple defined.

    My program was linking great. Then I added a whole bunch of new code and
    when I link, I now get the following link errors:

    nafxcwd.lib(afxmem.obj) : error LNK2005: "void * __cdecl operator
    new(unsigned int)" (??2@YAPAXI@Z) already defined in LIBCMTD.lib(new.obj)
    nafxcwd.lib(afxmem.obj) : error LNK2005: "void __cdecl operator delete(void
    *)" (??3@YAXPAX@Z) already defined in LIBCMTD.lib(dbgdel.obj)
    Debug/CADI-Server-Process.exe : fatal error LNK1169: one or more multiply
    defined symbols found


    The new stuff I added uses a std::vector. Maybe this is related to the
    problem.

    My program is fairly simple and small. It does use one 3rd party library.
    The library is from a company Netbula. The product is ONC RPC SDK. This
    allows my program to communicate with a Unix box using Unix based RPC.
    Perhaps this library is part of the cause.

    What should I do now?



  2. Re: Link problems. Multiple defined.

    The problem has vanished.

    Sorry to bother everyone.

    "Webster" wrote in message
    news:7Na2f.29$dO2.24@newssvr29.news.prodigy.net...
    > My program was linking great. Then I added a whole bunch of new code and
    > when I link, I now get the following link errors:
    >
    > nafxcwd.lib(afxmem.obj) : error LNK2005: "void * __cdecl operator
    > new(unsigned int)" (??2@YAPAXI@Z) already defined in LIBCMTD.lib(new.obj)
    > nafxcwd.lib(afxmem.obj) : error LNK2005: "void __cdecl operator
    > delete(void *)" (??3@YAXPAX@Z) already defined in LIBCMTD.lib(dbgdel.obj)
    > Debug/CADI-Server-Process.exe : fatal error LNK1169: one or more multiply
    > defined symbols found
    >
    >
    > The new stuff I added uses a std::vector. Maybe this is related to the
    > problem.
    >
    > My program is fairly simple and small. It does use one 3rd party library.
    > The library is from a company Netbula. The product is ONC RPC SDK. This
    > allows my program to communicate with a Unix box using Unix based RPC.
    > Perhaps this library is part of the cause.
    >
    > What should I do now?
    >




+ Reply to Thread