Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

#3420 Tests fail to link when compiling as a DLL with Visual C++ #3421

Merged
merged 2 commits into from
Jun 8, 2021
Merged

#3420 Tests fail to link when compiling as a DLL with Visual C++ #3421

merged 2 commits into from
Jun 8, 2021

Conversation

florin-crisan
Copy link
Contributor

No description provided.

@google-cla google-cla bot added the cla: yes label May 28, 2021
@florin-crisan florin-crisan changed the title Fix #3420 Tests fail to link when compiling as a DLL with Visual C++ closes #3420 Tests fail to link when compiling as a DLL with Visual C++ May 28, 2021
@florin-crisan florin-crisan changed the title closes #3420 Tests fail to link when compiling as a DLL with Visual C++ fixes googletest/googletest#3420 Tests fail to link when compiling as a DLL with Visual C++ May 28, 2021
@florin-crisan florin-crisan changed the title fixes googletest/googletest#3420 Tests fail to link when compiling as a DLL with Visual C++ fixes googletest/googletest#3420 May 28, 2021
@florin-crisan
Copy link
Contributor Author

I can't seem to figure out how to link it to the issue.

@florin-crisan florin-crisan changed the title fixes googletest/googletest#3420 fixes google/googletest#3420 May 28, 2021
@florin-crisan florin-crisan changed the title fixes google/googletest#3420 fixes #3420 May 28, 2021
@TheStormN
Copy link

TheStormN commented Jun 1, 2021

I can't seem to figure out how to link it to the issue.

Just add it to the description(not the title). Like: #3420 and it will automatically link it.

Note: use the full URL https://github.com/google/googletest/issues/3420. Github will convert it to short link.

@florin-crisan florin-crisan changed the title fixes #3420 #3420 Tests fail to link when compiling as a DLL with Visual C++ Jun 2, 2021
@florin-crisan florin-crisan changed the title #3420 Tests fail to link when compiling as a DLL with Visual C++ https://github.com/google/googletest/issues/3420 Tests fail to link when compiling as a DLL with Visual C++ Jun 3, 2021
@florin-crisan florin-crisan changed the title https://github.com/google/googletest/issues/3420 Tests fail to link when compiling as a DLL with Visual C++ #3420 Tests fail to link when compiling as a DLL with Visual C++ Jun 3, 2021
@florin-crisan florin-crisan reopened this Jun 3, 2021
… 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)
```
This was causing the following linker error on Microsoft Visual C++ when compiling as a DLL:

```
googletest-param-test-test.cc.obj : error LNK2019: unresolved external symbol "public: __cdecl testing::internal::MarkAsIgnored::MarkAsIgnored(char const *)" (??0MarkAsIgnored@internal@testing@@qeaa@PEBD@Z) referenced in function "void __cdecl works_here::`dynamic initializer for 'gtest_allow_ignore_NotInstantiatedTest''(void)" (??__Egtest_allow_ignore_NotInstantiatedTest@works_here@@yaxxz)
```
@derekmauro derekmauro self-assigned this Jun 7, 2021
@derekmauro derekmauro merged commit 91e1bd6 into google:master Jun 8, 2021
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

3 participants