summaryrefslogtreecommitdiffstats
path: root/googletest/include
diff options
context:
space:
mode:
authorFlorin Crișan <florin.crisan@gmail.com>2021-05-28 08:06:59 (GMT)
committerFlorin Crișan <florin.crisan@gmail.com>2021-06-03 06:12:53 (GMT)
commite1cc005f4c5a14069ac7492fbe107e44cdff30c8 (patch)
treec2ea9e685f99c136104f6f168e416337ef48371f /googletest/include
parent53495a2a7d6ba7e0691a7f3602e9a5324bba6e45 (diff)
downloadgoogletest-e1cc005f4c5a14069ac7492fbe107e44cdff30c8.zip
googletest-e1cc005f4c5a14069ac7492fbe107e44cdff30c8.tar.gz
googletest-e1cc005f4c5a14069ac7492fbe107e44cdff30c8.tar.bz2
#3420 Properly declare all overloads of testing::internal::PrintTo as DLL exports
This was causing the following linker error on Microsoft Visual C++ when compiling as a DLL: ``` googletest-printers-test.cc.obj : error LNK2019: unresolved external symbol "void __cdecl testing::internal::PrintTo(char16_t const *,class std::basic_ostream<char,struct std::char_traits<char> > *)" (?PrintTo@internal@testing@@YAXPEB_SPEAV?$basic_ostream@DU?$char_traits@D@std@@@std@@@Z) referenced in function "public: static void __cdecl testing::internal::UniversalPrinter<char16_t const *>::Print(char16_t const * const &,class std::basic_ostream<char,struct std::char_traits<char> > *)" (?Print@?$UniversalPrinter@PEB_S@internal@testing@@SAXAEBQEB_SPEAV?$basic_ostream@DU?$char_traits@D@std@@@std@@@Z) googletest-printers-test.cc.obj : error LNK2019: unresolved external symbol "void __cdecl testing::internal::PrintTo(char32_t const *,class std::basic_ostream<char,struct std::char_traits<char> > *)" (?PrintTo@internal@testing@@YAXPEB_UPEAV?$basic_ostream@DU?$char_traits@D@std@@@std@@@Z) referenced in function "public: static void __cdecl testing::internal::UniversalPrinter<char32_t const *>::Print(char32_t const * const &,class std::basic_ostream<char,struct std::char_traits<char> > *)" (?Print@?$UniversalPrinter@PEB_U@internal@testing@@SAXAEBQEB_UPEAV?$basic_ostream@DU?$char_traits@D@std@@@std@@@Z) ```
Diffstat (limited to 'googletest/include')
-rw-r--r--googletest/include/gtest/gtest-printers.h6
1 files changed, 3 insertions, 3 deletions
diff --git a/googletest/include/gtest/gtest-printers.h b/googletest/include/gtest/gtest-printers.h
index 978420e..076c9de 100644
--- a/googletest/include/gtest/gtest-printers.h
+++ b/googletest/include/gtest/gtest-printers.h
@@ -501,18 +501,18 @@ inline void PrintTo(unsigned char* s, ::std::ostream* os) {
}
#ifdef __cpp_char8_t
// Overloads for u8 strings.
-void PrintTo(const char8_t* s, ::std::ostream* os);
+GTEST_API_ void PrintTo(const char8_t* s, ::std::ostream* os);
inline void PrintTo(char8_t* s, ::std::ostream* os) {
PrintTo(ImplicitCast_<const char8_t*>(s), os);
}
#endif
// Overloads for u16 strings.
-void PrintTo(const char16_t* s, ::std::ostream* os);
+GTEST_API_ void PrintTo(const char16_t* s, ::std::ostream* os);
inline void PrintTo(char16_t* s, ::std::ostream* os) {
PrintTo(ImplicitCast_<const char16_t*>(s), os);
}
// Overloads for u32 strings.
-void PrintTo(const char32_t* s, ::std::ostream* os);
+GTEST_API_ void PrintTo(const char32_t* s, ::std::ostream* os);
inline void PrintTo(char32_t* s, ::std::ostream* os) {
PrintTo(ImplicitCast_<const char32_t*>(s), os);
}