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

[Bug]: DEBUG version cannot parse external symbol: 'testing:: FLAGS_gtest_filter' #4627

Open
rememberBr opened this issue Oct 18, 2024 · 0 comments

Comments

@rememberBr
Copy link

rememberBr commented Oct 18, 2024

Describe the issue

debug.zip
When I use gtest for unit testing and want to perform a separate test, I use: testing:: GTEST_LAG (filter). When using the release version of gtest, everything works fine. When using the debug version, it prompts: error LNK2001: unresolved external symbol "class std::basic_string<char,struct std::char_traits,class std::allocator > testing::FLAGS_gtest_filter" (?FLAGS_gtest_filter@testing@@3v?$basic_string@DU?$char_traits@D@std@@v?$allocator@D@2@@std@@A)
Fatal error LNK1120: 1 unresolved external command

A simple demo that can be used to reproduce bugs can be found in debug. zip

Steps to reproduce the problem

see debug.zip

What version of GoogleTest are you using?

The Linux version also has the same issue.

I have tried versions 1.13, 1.14, and 1.15 of gtest and have encountered this issue.

What operating system and version are you using?

win10 and ubuntu 20.04

What compiler and version are you using?

Linux:gcc version 9.4.0

win10:gcc version 6.3.0 (MinGW.org GCC-6.3.0-1)

What build system are you using?

win10 :cmake version 3.30.2

Additional context

No response

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant