Ask Your Question
-1

Solve the error [closed]

asked 2016-08-17 07:24:36 -0600

ramasamy-rudram gravatar image

I'm getting the following error,

Error 100 error LNK2038: mismatch detected for 'RuntimeLibrary': value 'MTd_StaticDebug' doesn't match value 'MDd_DynamicDebug' in webcam_face_pose_ex.obj D:\Ram\Projects\DLibCameraStream\dlib-19.0\examples\build\IlmImfd.lib(ImfFloatAttribute.obj) webcam_face_pose_ex

How can I solve it.

edit retag flag offensive reopen merge delete

Closed for the following reason question is off-topic or not relevant by berak
close date 2016-08-18 00:16:20.683764

Comments

Basically your libs were build dynamically with the /Md option, while you are truing to access them through a static build using the /Mt option. Either build your code also dynamically or rebuild OpenCV from scratch as a static library.

StevenPuttemans gravatar imageStevenPuttemans ( 2016-08-17 09:16:28 -0600 )edit

For my project in visual studio, Multi-threaded Debug (/MTd) is set. So | am compiling with /MTd option.

ramasamy-rudram gravatar imageramasamy-rudram ( 2016-08-17 09:35:39 -0600 )edit

I changed the Code Generation option to Multi-threaded DLL (/MD). I'm still getting the same error.

ramasamy-rudram gravatar imageramasamy-rudram ( 2016-08-17 09:40:03 -0600 )edit

all of this is unrelated to opencv

berak gravatar imageberak ( 2016-08-18 00:16:44 -0600 )edit

1 answer

Sort by ยป oldest newest most voted
0

answered 2016-08-17 08:07:12 -0600

Ice_T02 gravatar image

Did you try googling the LNK2038 error? Try the following: Link

edit flag offensive delete link more

Comments

I just cleaned it and rebuilt it and changed the Runtime Library property value to /MTd. I get Error 1 error LNK2038: mismatch detected for 'RuntimeLibrary': value 'MDd_DynamicDebug' doesn't match value 'MTd_StaticDebug' in webcam_face_pose_ex.obj D:\Ram\Projects\DLibCameraStream\dlib-19.0\examples\build\dlib.lib(entropy_decoder_kernel_2.obj).

ramasamy-rudram gravatar imageramasamy-rudram ( 2016-08-17 08:31:14 -0600 )edit

Go to the link and look at this section:

  • Runtime library:

Indicates the version of the C++ Standard Library and C runtime that's used by an app or library. Code that uses one version of the C++ Standard Library or C runtime is incompatible with code that uses a different version. For more information, see /MD, /MT, /LD (Use Run-Time Library).

Ice_T02 gravatar imageIce_T02 ( 2016-08-17 08:39:45 -0600 )edit

In the solution explorer, the project has .cpp source files and I have some .lib files added to additional dependencies. The lib files are prebuilt opencv libs. Would I need to recompile the libs with different setting.

ramasamy-rudram gravatar imageramasamy-rudram ( 2016-08-17 09:02:05 -0600 )edit

Normally you shouldn't have to recompile any of opencv's libraries. Did you add the opencv to the global system variables (i assume you work with windows) and set the correct libraries in your project properties?

Ice_T02 gravatar imageIce_T02 ( 2016-08-18 04:29:07 -0600 )edit

Question Tools

1 follower

Stats

Asked: 2016-08-17 07:24:36 -0600

Seen: 1,072 times

Last updated: Aug 17 '16