Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

dlib19.15.0_release_64bit_msvc1900.lib(dlib_generated_cuda_dlib.cu.obj) : error LNK2038: mismatch detected for 'RuntimeLibrary': value 'MD_DynamicRelease' doesn't match value 'MT_StaticRelease' #1448

Closed
virtualenv opened this issue Aug 16, 2018 · 2 comments

Comments

@virtualenv
Copy link

Hi,

I have an library that I need to include in my project that needs to be runtime libray (/MT).
Trying to build dlib with the same spec, I got the error :

dlib19.15.0_release_64bit_msvc1900.lib(dlib_generated_cuda_dlib.cu.obj) : error LNK2038: mismatch detected for 'RuntimeLibrary': value 'MD_DynamicRelease' doesn't match value 'MT_StaticRelease'

Could someone point me to the right direction please ?

Thank you.

Mauricio.

@virtualenv
Copy link
Author

After several hours, I realized it was a CMake setting.
Just add :
set(CMAKE_CXX_FLAGS_RELEASE "${CMAKE_CXX_FLAGS_RELEASE} /MT")

in /dlib19.5/dlib/CMakeLists.txt

@seamanj
Copy link

seamanj commented Aug 17, 2019

you save my day.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants