Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • SEARCH
  • Home
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 4267182
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 21, 20262026-05-21T06:51:50+00:00 2026-05-21T06:51:50+00:00

When linking my dll in release build I get – 1>LINK : warning LNK4098:

  • 0

When linking my dll in release build I get –

1>LINK : warning LNK4098: defaultlib
‘mfc80d.lib’ conflicts with use of
other libs; use /NODEFAULTLIB:library

1>LINK : warning LNK4098: defaultlib
‘mfcs80d.lib’ conflicts with use of
other libs; use /NODEFAULTLIB:library

1>LINK : warning LNK4098: defaultlib
‘msvcrtd.lib’ conflicts with use of
other libs; use /NODEFAULTLIB:library

adding /VERBOSE, I see the following (snippet):
…

1> Searching D:\Microsoft Visual
Studio 8\VC\atlmfc\lib\mfc80d.lib:

1>
Found “public: virtual __thiscall
AFX_MODULE_STATE::~AFX_MODULE_STATE(void)”
(??1AFX_MODULE_STATE@@UAE@XZ) 1>
Referenced in mfcs80.lib(dllmodul.obj)
1> Loaded
mfc80d.lib(MFC80D.DLL)

1> Found “long stdcall
AfxWndProc(struct HWND__ *,unsigned
int,unsigned int,long)”
(?AfxWndProc@@YGJPAUHWND__@@IIJ@Z)

1>
Referenced in mfcs80.lib(dllmodul.obj)
1> Loaded
mfc80d.lib(MFC80D.DLL)

…

If I’m interpreting this correctly, it means the linker somehow resolves calls from the (optimized) library mfcs80, as calls into the (non-optimized) library mfc80D. How can this be??

When I add /NODEFAULTLIB:mfc80d.lib the warnings are gone, but I’m not quiet with it yet. As an aside, the module does indeed suffer from sporadic inexplicable crashes on incremental links, that are solved only by a re-build. I’m using VS2005.

[Edit:] Changed the title to include DEFAULTLIB, hopefully better focusing the subject. I do see an explicit line saying

processed /DEFAULTLIB:mfc80d.lib

in the /VERBOSE output, among many other (non-debug) default libs. Where does it come from? how can I fix this?

Thanks!

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-05-21T06:51:50+00:00Added an answer on May 21, 2026 at 6:51 am

    The issue was resolved much later – I post it up here in case it helps somebody someday.

    It turned out to be a wrong precompiled header path: release configuration pointed to the default debug PCH path. So on transition from debug to release, a build would drag in all the debug PCH contents – apparently including some debug versions of MFC #pragma (comment “lib..”) (included in afx headers). A clean build would rebuild the PCH correctly, but again into the debug folder – thereby causing identical problems on transition back to debug build.

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

In VS2010, C++ project I get this error when linking in x64/Release: error LNK2038:
I don't code with lib linking and dll for most of the time, recently
I know microsoft recommends against linking to the msvcrt.dll, so please spare me from
During compilation and linking, what is use of .exp? What is the difference between
I am trying to run a console C++ application linking with my DLL files
I have a VC++ project in VS2010 that is linking to some dll's built
When creating a MFC DLL project in VC++ 2005, you get a screen application
I have to interdependent dll here that i would like to build without having
I have a C++ Builder DLL that must link against a Delphi package (BPL),
When calling an unmanaged Dll from a c# application I get an AccessViolationException .

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.