aboutsummaryrefslogtreecommitdiff
path: root/README
diff options
context:
space:
mode:
authorzhanyong.wan <zhanyong.wan@861a406c-534a-0410-8894-cb66d6ee9925>2010-09-28 21:28:24 +0000
committerzhanyong.wan <zhanyong.wan@861a406c-534a-0410-8894-cb66d6ee9925>2010-09-28 21:28:24 +0000
commit9c3d66814955c7c147bb46e0369f1e0c40c018d6 (patch)
tree1737d6ea9032d5745863ea067e0d60ad227dea87 /README
parent3928282cf0323a42e85e7885bddc54409021166f (diff)
downloadgtest-9c3d66814955c7c147bb46e0369f1e0c40c018d6.tar.gz
Clarifies how to use gtest as a shared library in README.
git-svn-id: http://googletest.googlecode.com/svn/trunk@488 861a406c-534a-0410-8894-cb66d6ee9925
Diffstat (limited to 'README')
-rw-r--r--README12
1 files changed, 10 insertions, 2 deletions
diff --git a/README b/README
index b82c5b5..51a9376 100644
--- a/README
+++ b/README
@@ -288,7 +288,7 @@ Google Test is compact, so most users can build and link it as a
static library for the simplicity. You can choose to use Google Test
as a shared library (known as a DLL on Windows) if you prefer.
-To compile gtest as a shared library, add
+To compile *gtest* as a shared library, add
-DGTEST_CREATE_SHARED_LIBRARY=1
@@ -296,12 +296,20 @@ to the compiler flags. You'll also need to tell the linker to produce
a shared library instead - consult your linker's manual for how to do
it.
-To compile your tests that use the gtest shared library, add
+To compile your *tests* that use the gtest shared library, add
-DGTEST_LINKED_AS_SHARED_LIBRARY=1
to the compiler flags.
+Note: while the above steps aren't technically necessary today when
+using some compilers (e.g. GCC), they may become necessary in the
+future, if we decide to improve the speed of loading the library (see
+http://gcc.gnu.org/wiki/Visibility for details). Therefore you are
+recommended to always add the above flags when using Google Test as a
+shared library. Otherwise a future release of Google Test may break
+your build script.
+
### Avoiding Macro Name Clashes ###
In C++, macros don't obey namespaces. Therefore two libraries that