strange errors...

This is a discussion on strange errors... within the Windows Programming forums, part of the Platform Specific Boards category; Has anyone seen these errors before? I haven't got a clue how to remove them I am currently creating a ...

  1. #1
    Seeking motivation... endo's Avatar
    Join Date
    May 2002
    Posts
    537

    strange errors...

    Has anyone seen these errors before? I haven't got a clue how to remove them I am currently creating a console program using some of the MFC classes if thats likely to be the cause

    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 libcpmtd.lib(delop.obj)
    Debug/console tkd.exe : fatal error LNK1169: one or more multiply defined symbols found
    Couldn't think of anything interesting, cool or funny - sorry.

  2. #2
    Registered User (TNT)'s Avatar
    Join Date
    Aug 2001
    Location
    UK
    Posts
    339
    MSDN:
    Linker Tools Error LNK2005:

    One of the following may be a cause:

    The most common cause of this error is accidentally linking with both the single-threaded and multithreaded libraries. Ensure that the application project file includes only the appropriate libraries and that any third-party libraries have appropriately created single-threaded or multithreaded versions.


    The given symbol was a packaged function (created by compiling with /Gy) and was included in more than one file but was changed between compilations. Recompile all files that include the symbol.


    The given symbol was defined differently in two member objects in different libraries, and both member objects were used.


    An absolute was defined twice, with a different value in each definition.

    This error is followed by fatal error LNK1169.


    Linker Tools Error LNK1169

    The build failed due to multiple definitions of one or more symbols. This error is preceded by error LNK2005.

    Looks like youve declared or linked something twice...

    Hope that helps,
    TNT
    TNT
    You Can Stop Me, But You Cant Stop Us All

  3. #3
    Seeking motivation... endo's Avatar
    Join Date
    May 2002
    Posts
    537
    Its very strange, it comes and goes without me changing anything sometimes. And it is referring to new and delete which I would've thought would be protected against multiple definitions...
    Couldn't think of anything interesting, cool or funny - sorry.

  4. #4
    Seeking motivation... endo's Avatar
    Join Date
    May 2002
    Posts
    537
    Found the solution, its here if your interested

    http://support.microsoft.com/default.aspx?scid=KB;EN-US;q148652&
    Couldn't think of anything interesting, cool or funny - sorry.

Popular pages Recent additions subscribe to a feed

Similar Threads

  1. Sneaky little linker errors...
    By Tozar in forum C++ Programming
    Replies: 8
    Last Post: 10-25-2006, 06:40 AM
  2. Errors with header files in OpenGL using VisualC++
    By wile_spice in forum Game Programming
    Replies: 3
    Last Post: 06-22-2006, 09:56 AM
  3. strange errors
    By duvernais28 in forum C Programming
    Replies: 9
    Last Post: 02-19-2005, 09:40 AM
  4. strange errors?
    By egomaster69 in forum C Programming
    Replies: 6
    Last Post: 12-21-2004, 06:13 PM
  5. help with strange errors
    By rockdj in forum C++ Programming
    Replies: 4
    Last Post: 07-27-2004, 12:42 PM

1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21