Solved

MTd_StaticDebug vs. MTd_DynamicDebug

Posted on 2013-06-03
4
2,408 Views
Last Modified: 2013-06-03
Dear experts,

I am trying to compile an (MFC-based) project that uses two third party libraries (compiled as .lib). When I compile the project the linker reports the error:

error LNK2038: Conflict in "RuntimeLibrary": The value "MTd_StaticDebug" does not match the value "MDd_DynamicDebug".

Open in new window


Which settings must I change in one of the library projects in order to have both as "MTd_StaticDebug" or both as "MTd_DynamicDebug"?

Thanks in advance,

Albert
0
Comment
Question by:Albert-Georg
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
  • 2
4 Comments
 
LVL 44

Expert Comment

by:AndyAinscow
ID: 39215733
Just a guess.
Do you have static linking in your project settings (the default is dynamic linking).
0
 
LVL 31

Accepted Solution

by:
Zoppo earned 500 total points
ID: 39215737
Hi Albert-Georg,

you should check the setting 'Code Generation->Runtime Library' in 'C/C++' project settings. They need to be equal in every involved project. IMO you should prefer to use a dynamic runtime in all projects, that is 'Multi-threaded Debug DLL (/MDd)' in a DEBUG build and 'Multi-threaded DLL (/MD)' in RELEASE builds.

In projects using MFC you should even check the setting 'Use of MFC' in 'General', it should be set to 'Use MFC in a shared DLL' when you use dynamic runtime, otherwise it should be 'Use MFC in a static library'.

Hope that helps,

ZOPPO
0
 
LVL 44

Expert Comment

by:AndyAinscow
ID: 39215739
for dynamic read shared:
0000.jpg
0
 
LVL 1

Author Comment

by:Albert-Georg
ID: 39215803
Dear experts,

thank you for your fast answers. I have changed both libraries to 'Multi-threaded Debug DLL (/MDd)' and now it works.

Sincerely,

Albert
0

Featured Post

Salesforce Has Never Been Easier

Improve and reinforce salesforce training & adoption using WalkMe's digital adoption platform. Start saving on costly employee training by creating fast intuitive Walk-Thrus for Salesforce. Claim your Free Account Now

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

What my article will show is if you ever had to do processing to a listbox without being able to just select all the items in it. My software Visual Studio 2008 crystal report v11 My issue was I wanted to add crystal report to a form and show…
For a while now I'v been searching for a circular progress control, much like the one you get when first starting your Silverlight application. I found a couple that were written in WPF and there were a few written in Silverlight, but all appeared o…
The viewer will learn how to pass data into a function in C++. This is one step further in using functions. Instead of only printing text onto the console, the function will be able to perform calculations with argumentents given by the user.
The viewer will learn how to clear a vector as well as how to detect empty vectors in C++.

623 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question