aboutsummaryrefslogtreecommitdiffstats
path: root/googletest/README.md
diff options
context:
space:
mode:
authorJoe Alam <joe@robotgoblin.co.uk>2017-10-07 23:34:53 +0100
committerJoe Alam <joe@robotgoblin.co.uk>2017-10-07 23:34:53 +0100
commit4597ec587ca2a5e35cfb8e44257ce2340624b22a (patch)
tree5b0d3c3157593c426071e0ec95704010d10196b3 /googletest/README.md
parent7b6561c56e353100aca8458d7bc49c4e0119bae8 (diff)
downloadgoogletest-4597ec587ca2a5e35cfb8e44257ce2340624b22a.tar.gz
googletest-4597ec587ca2a5e35cfb8e44257ce2340624b22a.tar.bz2
googletest-4597ec587ca2a5e35cfb8e44257ce2340624b22a.zip
Updated README with information about C runtime dynamic/static linking issues in Windows
Diffstat (limited to 'googletest/README.md')
-rw-r--r--googletest/README.md11
1 files changed, 11 insertions, 0 deletions
diff --git a/googletest/README.md b/googletest/README.md
index 0a3474c0..0f6d6d59 100644
--- a/googletest/README.md
+++ b/googletest/README.md
@@ -182,6 +182,17 @@ technique is discussed in more detail in
which also contains a link to a fully generalized implementation
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 ###