diff options
author | Gennadiy Civil <gennadiycivil@users.noreply.github.com> | 2017-10-15 19:15:31 -0700 |
---|---|---|
committer | GitHub <noreply@github.com> | 2017-10-15 19:15:31 -0700 |
commit | 3282f9ae018f5ff62ceae16132f908e9a9eadbb4 (patch) | |
tree | 126c0941316b441bcadbeb6c6b0789f54629eb25 | |
parent | 963932e7f37b2dff8d122376fa1c54909d34676a (diff) | |
parent | 4597ec587ca2a5e35cfb8e44257ce2340624b22a (diff) | |
download | googletest-3282f9ae018f5ff62ceae16132f908e9a9eadbb4.tar.gz googletest-3282f9ae018f5ff62ceae16132f908e9a9eadbb4.tar.bz2 googletest-3282f9ae018f5ff62ceae16132f908e9a9eadbb4.zip |
Merge pull request #1288 from joealam/master
Updated README with C runtime dynamic/static linking issues in Windows info
-rw-r--r-- | googletest/README.md | 11 |
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 ### |