Can't link runtime library statically without mismatch error

I am trying to switch to linking my library statically instead of dynamically. I am able to successfully build in Visual Studio 2017 and it works great, but when I go to build from the command line I get errors like this:

AAXLibrary_D.lib(AAX_CEffectParameters.obj) : error LNK2038: mismatch detected for ‘RuntimeLibrary’: value ‘MDd_Dynamic
Debug’ doesn’t match value ‘MTd_StaticDebug’ in…

Anybody know what might be going on?

Did you build the AAX Library to match?


What do you mean?

If AAXLibrary_D.lib was built using the dynamic runtime, then you cannot link against it unless you also use the dynamic runtime.

If you want to use the static runtime and link against the AAX library, then you have to build the AAX library using the static runtime first.

1 Like

That definitely did the trick! Thanks!

1 Like