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

  • Home
  • SEARCH
  • 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 4346042
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 21, 20262026-05-21T12:07:14+00:00 2026-05-21T12:07:14+00:00

I have a static S.lib that is used by my D.dll. I’m trying to

  • 0

I have a static S.lib that is used by my D.dll.

I’m trying to use #pragma detect_mismatch to make sure that both were compiled under the same release or debug settings.

I’ve followed Holger Grund’s instructions here
http://boost.2283326.n4.nabble.com/Boost-and-Microsoft-s-SECURE-SCL-td3025203.html

dumpbin on S.lib shows:

 Linker Directives
 -----------------
 /FAILIFMISMATCH:"COMPILED_DEBUG=1"
 /INCLUDE:_dll_impl_interface_mismatch_check
 /DEFAULTLIB:"MSVCRTD"
 /DEFAULTLIB:"OLDNAMES"

I compile D.dll successfully, which should not happen.

dumpbin on D.dll’s D.lib shows:

Linker Directives
-----------------
/FAILIFMISMATCH:"COMPILED_DEBUG=2"
/INCLUDE:_dll_impl_interface_mismatch_check
/DEFAULTLIB:"uuid.lib"
/DEFAULTLIB:"uuid.lib"
/FAILIFMISMATCH:"_MSC_VER=1600"
/FAILIFMISMATCH:"_ITERATOR_DEBUG_LEVEL=2"
/DEFAULTLIB:"msvcprtd"
/DEFAULTLIB:"MSVCRTD"
/DEFAULTLIB:"OLDNAMES"

Any help would be greatly appreciated.

EDIT:

I accidentally defined the symbol ‘dll_impl_interface_mismatch_check’ in BOTH my static library and my consuming DLL. This meant that the symbol was not looked for in the static library S.lib, and the mismatch directive was never found. I think.

  • 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-21T12:07:15+00:00Added an answer on May 21, 2026 at 12:07 pm

    I’m just guessing here – I’ll have to experiment with this tonight.

    Holger Grund’s instructions are designed for objects that depend on the DLL. In your case the DLL depends on the static lib.

    So, I’m guessing that you want the _dll_impl_interface_mismatch_check object to be added to the static lib rather than the DLL. So instead of:

    extern "C" const char dll_impl_interface_mismatch_check=0;
    
    cl /c /Zl foo.cpp
    lib D.lib foo.obj 
    

    try:

    extern "C" const char dll_impl_interface_mismatch_check=0;
    
    cl /c /Zl foo.cpp
    lib S.lib foo.obj 
    
    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I have a static class that I use as my Data Utils for my
I have a bunch of static .lib files including mysqlclient.lib, v8_base.lib and mysqlpp.lib that
Problem (simplified to make things clearer): 1. there is one statically-linked static.lib that has
I have a static library that is used in production code and test code.
Under gcc (g++), I have compiled a static .a (call it some_static_lib.a ) library.
I have a collection of static libraries (.lib) files one of which may have
Suppose I have static ip in a subnet that has DHCP server. If i
I have a dll function that takes BSTR parameters. These are cast as char*
I have an awkward situation in which I have a 32-bit lib that must
I have a static lib A, which also uses static libs B, C and

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.