-3

I am using QtCreator for my project, I need to link some libraries dynamically because of license and I have some larger static library available, but I use only a small portion from it. When I try it, I got an error mixing builds.

base.lib(base.thread_local_storage.obj):-1: error: LNK2038: mismatch detected for 'RuntimeLibrary': value 'MT_StaticRelease' doesn't match value 'MD_DynamicRelease' in Updater.obj

I am using msvc2017-64. how to configure the .pro file to achieve this?

Thomas Sablik
  • 16,127
  • 7
  • 34
  • 62

1 Answers1

0

Your CRT-Bindings are in Mismatch.

Under Project > C/C++ All Options > Runtime Library

You need to change at least one of the libs to MT or MD so there won't be a mismatch anymore.

Here you will find the solution: LNK2038: mismatch detected for 'RuntimeLibrary': value 'MT_StaticRelease' doesn't match value 'MD_DynamicRelease' in file.obj

If you compile the libs with Visual Studio

SepGuest
  • 127
  • 1
  • 11
  • For QtCreator: https://stackoverflow.com/questions/16688079/how-to-change-the-c-runtime-library-setting-in-qtcreator – SepGuest Mar 22 '19 at 11:55