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 7407937
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 29, 20262026-05-29T05:49:06+00:00 2026-05-29T05:49:06+00:00

I build /mt (run-time library:multi-threaded) and /md (run-time library:multi-threaded-dll) versions of my C++ DLL

  • 0

I build /mt (run-time library:multi-threaded) and /md (run-time library:multi-threaded-dll) versions of my C++ DLL with visual studio 2008.

Applications which link to the /md build runs fine,
but applications which link to the /mt build crash.

Interestingly applications which link to the static version of the /mt build work fine.

Does it make sense to build a DLL with /mt and use it with an application which is also built with /mt?

How can I trace the reason for this sort of crash?

Regards,

Paul

  • 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-29T05:49:07+00:00Added an answer on May 29, 2026 at 5:49 am

    It depends on your API. If you build your executables with the non-DLL version of the run time libraries then each DLL and EXE gets it’s own copy of the static data of the run time libraries. The most obvious effect is that you can’t allocate something dynamically from one module (DLL or EXE) and expect to safely free it in another module. There going to be other less common issues, for example if you srand in one module, don’t expect it to affect calls to rand across the application.

    It’s generally safest in an executable that links against other user DLLs to compile them all against the DLL version of the run time libraries. You might want to use the static versions of the run time libraries if you were building a statically linked executable using static libraries, perhaps for ease of packaging and distribution but I don’t see much benefit in a hybrid configuration given the potential issues.

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

Sidebar

Related Questions

This post and this post says that with Visual Studio, the run time library
I'm building a c++ DLL in visual studio 2008. For some reason, even when
My visual studio addin project will not longer build and run in the debugger.
I have a solution to build a DLL with run-time type information enabled in
From time to time I need to run a full build of the entire
Having written a CGI application in Visual Studio 2008 and debigged it locally, I
I am working on my free time on a multiplatform/multi-architecture library written in C++
I have created a communication library which is linked statically into several different applications.
Assume I have three build configurations Build and Run Tests QA Build Production Build
I'm trying to build and run the demos included with ActionBarSherlock. I go to

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.