Results 1 to 5 of 5

Thread: Move\Extract\Delete *.lib functions

  1. #1

    Thread Starter
    PowerPoster
    Join Date
    Jul 2001
    Location
    Tucson, AZ
    Posts
    2,166

    Move\Extract\Delete *.lib functions

    I'm still getting LNK Error 2005

    nafxcwd.lib(afxinl1.obj) : error LNK2005: "public: virtual void __thiscall CObject::Serialize(class CArchive &)" (?Serialize@CObject@@UAEXAAVCArchive@@@Z) already defined in mfc42ud.lib(MFC42uD.DLL)


    It appears the conflict is being caused by a library file included in Project/Settings/Link as when this library is deleted only the functions contained in the library used by my code generate errors compile errors.

    QUESTIONS:

    1. Is their anyway to move/extract just those functions to another library, or delete the duplicate mfc42uD functions since I do NOT have the source code to recreate the other library?

    2. Is their anyway to get my code to ignore the duplicate functions (either the one in mfc42uD.dll or my link library)??

    3. Will creating a namespace resolve this conflict?

    Thanks
    David
    Last edited by dw85745; Jun 3rd, 2004 at 10:20 PM.

  2. #2
    Kitten CornedBee's Avatar
    Join Date
    Aug 2001
    Location
    In a microchip!
    Posts
    11,594
    1 and 3 are definite nos. 2 is more interesting. It should be possible to get your code to use mfc42ud.lib instead of the other, so that there's no conflict.

    What are the MFC settings in your project and what VC++ version are you using?
    All the buzzt
    CornedBee

    "Writing specifications is like writing a novel. Writing code is like writing poetry."
    - Anonymous, published by Raymond Chen

    Don't PM me with your problems, I scan most of the forums daily. If you do PM me, I will not answer your question.

  3. #3

    Thread Starter
    PowerPoster
    Join Date
    Jul 2001
    Location
    Tucson, AZ
    Posts
    2,166
    Thanks for responding CornedBee:

    Using VC++ 6.0.

    Just using debug. Attached is the *.dsp file so should provide any configuration info.

    ----------------------
    I'm using some of the functions in the lib. The functions I wanted to delete (conflict with mfc42uD) I am not using.
    Attached Files Attached Files

  4. #4
    Kitten CornedBee's Avatar
    Join Date
    Aug 2001
    Location
    In a microchip!
    Posts
    11,594
    I think you're using the ANSI MFC version while the library is using the UNICODE version. Short of recompiling the library (which apparently is not possible) you can only make sure that your app is UNICODE-compatible (all literal strings with _T etc...) and use the UNICODE version yourself.
    All the buzzt
    CornedBee

    "Writing specifications is like writing a novel. Writing code is like writing poetry."
    - Anonymous, published by Raymond Chen

    Don't PM me with your problems, I scan most of the forums daily. If you do PM me, I will not answer your question.

  5. #5

    Thread Starter
    PowerPoster
    Join Date
    Jul 2001
    Location
    Tucson, AZ
    Posts
    2,166
    Thanks for response. Will triplecheck code.

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  



Click Here to Expand Forum to Full Width