Commit 4597ec58 authored by Joe Alam's avatar Joe Alam
Browse files

Updated README with information about C runtime dynamic/static linking issues in Windows

parent 7b6561c5
...@@ -182,6 +182,17 @@ technique is discussed in more detail in ...@@ -182,6 +182,17 @@ technique is discussed in more detail in
which also contains a link to a fully generalized implementation which also contains a link to a fully generalized implementation
of the technique. of the technique.
##### Visual Studio Dynamic vs Static Runtimes #####
By default, new Visual Studio projects link the C runtimes dynamically
but Google Test links them statically.
This will generate an error that looks something like the following:
gtest.lib(gtest-all.obj) : error LNK2038: mismatch detected for 'RuntimeLibrary': value 'MTd_StaticDebug' doesn't match value 'MDd_DynamicDebug' in main.obj
Google Test already has a CMake option for this: `gtest_force_shared_crt`
Enabling this option will make gtest link the runtimes dynamically too,
and match the project in which it is included.
### Legacy Build Scripts ### ### Legacy Build Scripts ###
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment