From 86554039f1bc9e84c9e4e22a5af5d2b396fef5a0 Mon Sep 17 00:00:00 2001 From: vladlosev Date: Fri, 20 May 2011 00:38:55 +0000 Subject: Adds support for building Google Mock as a shared library (DLL). git-svn-id: http://googletest.googlecode.com/svn/trunk@583 861a406c-534a-0410-8894-cb66d6ee9925 --- include/gtest/internal/gtest-internal.h | 2 +- src/gtest.cc | 4 ++-- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/include/gtest/internal/gtest-internal.h b/include/gtest/internal/gtest-internal.h index 227d818..d0fe5f7 100644 --- a/include/gtest/internal/gtest-internal.h +++ b/include/gtest/internal/gtest-internal.h @@ -122,7 +122,7 @@ class TestInfoImpl; // Opaque implementation of TestInfo class UnitTestImpl; // Opaque implementation of UnitTest // How many times InitGoogleTest() has been called. -extern int g_init_gtest_count; +GTEST_API_ extern int g_init_gtest_count; // The text used in failure messages to indicate the start of the // stack trace. diff --git a/src/gtest.cc b/src/gtest.cc index 904d9d7..b6481f7 100644 --- a/src/gtest.cc +++ b/src/gtest.cc @@ -305,7 +305,7 @@ UInt32 Random::Generate(UInt32 range) { // Test. g_init_gtest_count is set to the number of times // InitGoogleTest() has been called. We don't protect this variable // under a mutex as it is only accessed in the main thread. -int g_init_gtest_count = 0; +GTEST_API_ int g_init_gtest_count = 0; static bool GTestIsInitialized() { return g_init_gtest_count != 0; } // Iterates over a vector of TestCases, keeping a running sum of the @@ -360,7 +360,7 @@ void AssertHelper::operator=(const Message& message) const { } // Mutex for linked pointers. -GTEST_DEFINE_STATIC_MUTEX_(g_linked_ptr_mutex); +GTEST_API_ GTEST_DEFINE_STATIC_MUTEX_(g_linked_ptr_mutex); // Application pathname gotten in InitGoogleTest. String g_executable_path; -- cgit v1.2.1