Solved

MTd_StaticDebug vs. MTd_DynamicDebug

Posted on 2013-06-03
4
2,335 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
  • 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 Made Easy to Use

On-screen guidance at the moment of need enables you & your employees to focus on the core, you can now boost your adoption rates swiftly and simply with one easy tool.

Question has a verified solution.

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

Go is an acronym of golang, is a programming language developed Google in 2007. Go is a new language that is mostly in the C family, with significant input from Pascal/Modula/Oberon family. Hence Go arisen as low-level language with fast compilation…
Container Orchestration platforms empower organizations to scale their apps at an exceptional rate. This is the reason numerous innovation-driven companies are moving apps to an appropriated datacenter wide platform that empowers them to scale at a …
The goal of the video will be to teach the user the concept of local variables and scope. An example of a locally defined variable will be given as well as an explanation of what scope is in C++. The local variable and concept of scope will be relat…
The viewer will be introduced to the member functions push_back and pop_back of the vector class. The video will teach the difference between the two as well as how to use each one along with its functionality.

828 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