Still celebrating National IT Professionals Day with 3 months of free Premium Membership. Use Code ITDAY17

x
?
Solved

MTd_StaticDebug vs. MTd_DynamicDebug

Posted on 2013-06-03
4
Medium Priority
?
2,481 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 2000 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

VIDEO: THE CONCERTO CLOUD FOR HEALTHCARE

Modern healthcare requires a modern cloud. View this brief video to understand how the Concerto Cloud for Healthcare can help your organization.

Question has a verified solution.

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

C++ Properties One feature missing from standard C++ that you will find in many other Object Oriented Programming languages is something called a Property (http://www.experts-exchange.com/Programming/Languages/CPP/A_3912-Object-Properties-in-C.ht…
Many modern programming languages support the concept of a property -- a class member that combines characteristics of both a data member and a method.  These are sometimes called "smart fields" because you can add logic that is applied automaticall…
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…
This is Part 3 in a 3-part series on Experts Exchange to discuss error handling in VBA code written for Excel. Part 1 of this series discussed basic error handling code using VBA. http://www.experts-exchange.com/videos/1478/Excel-Error-Handlin…

715 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